π‘οΈ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!
Docker: print a startup banner once the app is healthy
Omega (QA)9b7ea7445428
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ffd488c..b293e80 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,7 +2,7 @@## 1.0.5 - Unreleased-- **Smaller Docker image:** the Python dependencies now install into a virtualenv in the builder, and the runtime copies only that venv instead of the builder's whole /usr/local, so the image no longer carries a duplicate Python interpreter and standard library. Supervisor is the pip package (4.3.0) rather than the Debian package, which also removes the system Python that package pulled in. The entrypoint waits for the database with a short Python probe instead of pg_isready, so postgresql-client is gone, and the copied packages are stripped of bytecode caches, bundled test suites, and pip itself. Behaviour is unchanged: same base image, same startup flow, same supervisor-managed nginx, gunicorn, and cron. Setuptools is no longer a direct requirement (it was build tooling), and pip builds now use a BuildKit cache mount, so rebuilds on a maintainer's machine reuse previously downloaded packages.+- **Smaller Docker image:** the Python dependencies now install into a virtualenv in the builder, and the runtime copies only that venv instead of the builder's whole /usr/local, so the image no longer carries a duplicate Python interpreter and standard library. Supervisor is the pip package (4.3.0) rather than the Debian package, which also removes the system Python that package pulled in. The entrypoint waits for the database with a short Python probe instead of pg_isready, so postgresql-client is gone, and the copied packages are stripped of bytecode caches, bundled test suites, and pip itself. Behaviour is unchanged: same base image, same startup flow, same supervisor-managed nginx, gunicorn, and cron. Setuptools is no longer a direct requirement (it was build tooling), and pip builds now use a BuildKit cache mount, so rebuilds on a maintainer's machine reuse previously downloaded packages. Separately, the entrypoint now prints a Warracker banner to the container log once the app passes its health check, so a fully started container is easy to spot in the logs.- _Files: `Dockerfile`, `Docker/entrypoint.sh`, `Docker/supervisord.conf`, `docker-compose.yml`, `backend/requirements.txt`, `.dockerignore`_- **Security dependency updates:** Authlib 1.9.1 to 1.9.2, which carries the upstream security fix GHSA-f3fg-34g9-v7jx (ID-JAG access tokens are now limited to the scopes granted in the ID-JAG claim). The Python 3.15 slim base image digest was refreshed in both Dockerfile stages, and actions/checkout in the test workflow moves to v7, which by default blocks checking out fork pull requests under pull_request_target and workflow_run triggers.- _Files: `backend/requirements.txt`, `Dockerfile`, `.github/workflows/tests.yml`_diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.shindex ad4e265..251239d 100644--- a/Docker/entrypoint.sh+++ b/Docker/entrypoint.sh@@ -64,6 +64,31 @@ filog "Setup completed successfully!"+# Print a banner to the container log once the app answers its health+# check, so a healthy startup is easy to spot. Runs in the background:+# the supervisor start below is not delayed by it, and if the app never+# becomes healthy the banner simply never prints.+print_banner_when_ready() {+ local health_url="http://localhost/api/health"+ if [ "${DISABLE_NGINX:-false}" = "true" ]; then+ health_url="http://localhost:5000/api/health"+ fi+ for i in {1..45}; do+ if curl -fs "$health_url" > /dev/null 2>&1; then+ cat <<'BANNER'+β β β+β β β ββββ βββββ βββββ ββββ βββββ β ββ βββββ βββββ+β βββ β βββββ β β βββββ β ββββ βββββ β+βββ βββ βββββ β β βββββ βββββ β β βββββ β+BANNER+ log "Warracker is up and healthy."+ return 0+ fi+ sleep 2+ done+}+print_banner_when_ready &+# Execute the CMD (supervisor) by replacing this shell processlog "Starting supervisor..."exec "$@"