Use minimal Python Docker image for deployment #3

Merged
ai merged 1 commit from perf/optimize-deploy-time into main 2026-11-13 17:44:31 +01:00
Contributor

Use a minimal Python 3.12 slim image instead of Railpack runtime provisioning. The image includes the refresh script and page template, config, and bootstrap cache; it preserves /app, port 8080, sh scripts/start.sh, persistent /storage, and the existing scheduled refresh command. Limit the Docker context to deployment inputs and remove obsolete railpack.json. Document the Coolify build-pack switch and add a repeatable container smoke test.

Validation:

  • python3 -m unittest discover -s tests -v: 14 passed.
  • docker build -t vpm-deploy-smoke .: ARM64 image built; repeat build reused all application layers.
  • python3 tests/smoke_container.py: passed on ARM64.
  • docker build --platform linux/amd64 -t vpm-deploy-smoke .: built; same smoke test passed under local emulation.
  • Smoke verifies HTTP HTML/JSON serving, empty-volume bootstrap, exact scheduled refresh command with networking disabled (cached upstream fallback), byte-preserved state/index/status across container replacement, and landing-page replacement.
  • git diff --check: passed.
  • Fresh independent agent review: no findings; reviewer independently passed unit and container tests.

No Coolify settings changed. Parent coordinates switching the existing app to Dockerfile before merge, retaining /storage and its scheduled task. Production deployment timing and live upstream refresh were not measured. Leave unmerged pending parent independent review.

Use a minimal Python 3.12 slim image instead of Railpack runtime provisioning. The image includes the refresh script and page template, config, and bootstrap cache; it preserves `/app`, port 8080, `sh scripts/start.sh`, persistent `/storage`, and the existing scheduled refresh command. Limit the Docker context to deployment inputs and remove obsolete railpack.json. Document the Coolify build-pack switch and add a repeatable container smoke test. Validation: - `python3 -m unittest discover -s tests -v`: 14 passed. - `docker build -t vpm-deploy-smoke .`: ARM64 image built; repeat build reused all application layers. - `python3 tests/smoke_container.py`: passed on ARM64. - `docker build --platform linux/amd64 -t vpm-deploy-smoke .`: built; same smoke test passed under local emulation. - Smoke verifies HTTP HTML/JSON serving, empty-volume bootstrap, exact scheduled refresh command with networking disabled (cached upstream fallback), byte-preserved state/index/status across container replacement, and landing-page replacement. - `git diff --check`: passed. - Fresh independent agent review: no findings; reviewer independently passed unit and container tests. No Coolify settings changed. Parent coordinates switching the existing app to Dockerfile before merge, retaining `/storage` and its scheduled task. Production deployment timing and live upstream refresh were not measured. Leave unmerged pending parent independent review.
ai merged commit 0ee7278295 into main 2026-11-13 17:44:31 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
l/vpm!3
No description provided.