70 lines
1.4 KiB
YAML
70 lines
1.4 KiB
YAML
services:
|
|
backend:
|
|
build: ./backend
|
|
environment:
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
|
- CORS_ORIGINS=http://localhost,http://localhost:8080
|
|
volumes:
|
|
- db_data:/app/data
|
|
- uploads_data:/app/uploads
|
|
expose:
|
|
- "8000"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
start_period: 10s
|
|
retries: 3
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: "1.0"
|
|
cap_drop:
|
|
- ALL
|
|
cap_add:
|
|
- NET_BIND_SERVICE
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
ports:
|
|
- "8080:80"
|
|
depends_on:
|
|
- backend
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:80/"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
start_period: 5s
|
|
retries: 3
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
cpus: "0.5"
|
|
cap_drop:
|
|
- ALL
|
|
cap_add:
|
|
- NET_BIND_SERVICE
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
db_data:
|
|
uploads_data:
|