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
+10
View File
@@ -0,0 +1,10 @@
@echo off
setlocal
if defined GIT_BASH goto run
set "GIT_BASH=%ProgramFiles%\Git\bin\bash.exe"
if exist "%GIT_BASH%" goto run
echo Git Bash was not found. Set GIT_BASH to the full path to bash.exe. 1>&2
exit /b 2
:run
"%GIT_BASH%" "%~dp0restart.sh"
exit /b %ERRORLEVEL%
+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