scientify/docker-compose.yml

41 lines
798 B
YAML

services:
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: scientify_db
POSTGRES_USER: scientify_user
POSTGRES_PASSWORD: scientify_pass
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U scientify_user -d scientify"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: ./backend
ports:
- "8000:8000"
environment:
- ./backend/.env
depends_on:
db:
condition: service_healthy
volumes:
- ./backend:/app
command: python main.py
frontend:
build: ./frontend
environment:
- ./.env.production
ports:
- "80:80"
depends_on:
- backend
volumes:
postgres_data: