An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(docker): ship versions.json in production image
Andras Bacsai6b3f60c7d6d0
diff --git a/docker/production/Dockerfile b/docker/production/Dockerfileindex 9f2f5c55b4..46d5c40c4a 100644--- a/docker/production/Dockerfile+++ b/docker/production/Dockerfile@@ -183,6 +183,8 @@ COPY --chown=www-data:www-data resources/views ./resources/viewsCOPY --chown=www-data:www-data artisan artisanCOPY --chown=www-data:www-data openapi.yaml ./openapi.yamlCOPY --chown=www-data:www-data changelogs/ ./changelogs/+# Version data for Traefik, Sentinel, and helper checks until CheckForUpdatesJob refreshes it+COPY --chown=www-data:www-data versions.json ./versions.jsonRUN composer dump-autoloaddiff --git a/tests/Unit/ProductionImageWorkflowTest.php b/tests/Unit/ProductionImageWorkflowTest.phpindex 7be4d80802..98adac798b 100644--- a/tests/Unit/ProductionImageWorkflowTest.php+++ b/tests/Unit/ProductionImageWorkflowTest.php@@ -222,3 +222,13 @@ it('guides issue authors to the correct contribution branch', function () {->toContain('Feature code should branch from `next` and target `next`')->toContain('Small fixes should target `main`; larger changes should target `next`');});++it('ships versions.json in the production image so version checks work right after an upgrade', function () {+ $dockerfile = file_get_contents(dirname(__DIR__, 2).'/docker/production/Dockerfile');+ $dockerignore = file_get_contents(dirname(__DIR__, 2).'/.dockerignore');++ expect($dockerfile)+ ->toContain('COPY --chown=www-data:www-data versions.json ./versions.json')+ ->and($dockerignore)+ ->not->toMatch('/^\/?versions\.json$/m');+});