43 lines
951 B
YAML
43 lines
951 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: pretor_db
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgrespassword
|
|
POSTGRES_DB: pretor
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d pretor"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
app:
|
|
build: .
|
|
container_name: pretor_app
|
|
ports:
|
|
- "8000:8000"
|
|
- "8265:8265"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgrespassword
|
|
- POSTGRES_HOST=db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_DB=pretor
|
|
- SECRET_KEY=changethiskey12345
|
|
volumes:
|
|
- .:/app
|
|
- /app/frontend/dist # Prevent local uncompiled frontend from overriding the built one
|
|
|
|
volumes:
|
|
postgres_data:
|