mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-15 22:48:00 +02:00
06a098fba7
- Multi-stage Dockerfile with BuildKit npm cache mounts and a separate prod-deps stage so source edits don't reinstall or prune. - Tighter .dockerignore to shrink build context. - Healthchecks: add start_period and tighten interval/retries so containers report healthy as soon as the process is actually ready instead of after a full polling interval. - Move recoverStuckPreparing() off the startup critical path; the recovery sweep now runs in the background after app.listen. - depends_on uses condition: service_healthy and the obsolete compose 'version' key is gone. - New scripts/build.sh + scripts/deploy.sh: deploy.sh builds, exits early if the image is unchanged, runs a blue/green streamer swap (scale to 2N, wait healthy in parallel, drop olds), then recreates the API with --no-deps to avoid compose's depends_on re-poll.
10 lines
214 B
Bash
Executable File
10 lines
214 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fast local image build with BuildKit enabled.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
export DOCKER_BUILDKIT=1
|
|
export COMPOSE_DOCKER_CLI_BUILD=1
|
|
|
|
docker compose build "$@" anonymous_github
|