build(docker): add Compose stack with migrations and persistent storage

This commit is contained in:
2026-10-14 06:29:12 +03:00
parent 6fff6188ed
commit 1dc5f08813
10 changed files with 190 additions and 28 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -eu
project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$project_dir"
for service in backend postgres redis; do
if [ -z "$(docker compose ps --all --quiet "$service")" ]; then
printf '%s\n' "Missing container for $service; start the Compose stack first." >&2
exit 1
fi
done
docker compose stop --timeout 10 backend postgres redis
docker compose up --detach --no-recreate --no-build --no-deps --wait --wait-timeout 45 postgres redis
docker compose up --detach --no-recreate --no-build --no-deps backend