sk1/docker-compose.yml
2026-05-19 22:47:34 +00:00

47 lines
821 B
YAML

version: '3.8'
services:
backend:
build: ./app
container_name: flask-backend
restart: always
environment:
DB_HOST: postgres
DB_NAME: mydb
DB_USER: admin
DB_PASSWORD: ${POSTGRES_PASSWORD}
depends_on:
- postgres
postgres:
image: postgres:15
container_name: postgres-db
restart: always
environment:
POSTGRES_DB: mydb
POSTGRES_USER: admin
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
nginx:
image: nginx:latest
container_name: nginx-proxy
restart: always
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- backend
volumes:
postgres_data: