fix: add restart policy and volume mapping for postgres and redis services in docker-compose
Build and deploy / build (push) Successful in 10s Details
Build and deploy / deploy (push) Successful in 15s Details

This commit is contained in:
k1nq 2025-11-30 00:03:21 +05:00
parent 82812ecf72
commit ef6b6d598e
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,7 @@
services:
app:
image: ${GIT_HOST}/${GIT_USER}/${GIT_REPO}:app
restart: unless-stopped
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
env_file:
- .env
@ -36,9 +37,13 @@ services:
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "5432:5432"
volumes:
- /mnt/data/postgres:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
command: redis-server --save "" --appendonly no
restart: unless-stopped
ports:
- "6379:6379"