build utils

This commit is contained in:
2024-04-12 22:44:02 +03:00
parent 8df8f5a2e9
commit f6d316cb5e
7 changed files with 68 additions and 4 deletions

View File

@ -1 +1,42 @@
services:
backend:
build:
context: backend
restart: unless-stopped
ports:
- "8000"
env_file:
- path: ./env/backend/prod.env
required: true
volumes:
- ./backend/app:/code/app:z
depends_on:
postgres:
condition: service_healthy
nginx:
build:
dockerfile: ./nginx/Dockerfile
restart: unless-stopped
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./static:/static
depends_on:
- backend
ports:
- "80:80"
postgres:
image: postgres:16.2-alpine
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- ./postgres_data:/var/lib/postgresql/data/
env_file:
- path: ./env/postgres.env
required: true
healthcheck:
test:
["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} --user $${POSTGRES_USER}"]
interval: 2s
timeout: 2s
retries: 5