mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
96 lines
2.7 KiB
YAML
96 lines
2.7 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
container_name: holy-backend
|
|
restart: unless-stopped
|
|
networks:
|
|
- narl
|
|
- internal
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./legacy:/app/legacy
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- DOMAIN=${DOMAIN:-holy.narl.io}
|
|
dns:
|
|
- 8.8.8.8
|
|
- 1.1.1.1
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=narl"
|
|
# Ultra-clean rule for maximum Traefik compatibility
|
|
- "traefik.http.routers.holy-energy-backend.priority=100"
|
|
- "traefik.http.routers.holy-energy-backend.rule=Host(`${DOMAIN:-holy.narl.io}`) && (PathPrefix(`/api`) || PathPrefix(`/admin/`) || PathPrefix(`/static`) || PathPrefix(`/media`))"
|
|
- "traefik.http.routers.holy-energy-backend.entrypoints=websecure"
|
|
- "traefik.http.routers.holy-energy-backend.tls.certresolver=https_resolver"
|
|
- "traefik.http.services.holy-energy-backend.loadbalancer.server.port=8000"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
worker:
|
|
build:
|
|
context: ./backend
|
|
container_name: holy-worker
|
|
command: python manage.py worker
|
|
restart: unless-stopped
|
|
networks:
|
|
- narl
|
|
- internal
|
|
dns:
|
|
- 8.8.8.8
|
|
- 1.1.1.1
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- DOMAIN=${DOMAIN:-holy.narl.io}
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./legacy:/app/legacy
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
args:
|
|
- VITE_API_URL=https://${DOMAIN:-holy.narl.io}/api/
|
|
- VITE_IMPRESSUM_NAME=${VITE_IMPRESSUM_NAME}
|
|
- VITE_IMPRESSUM_STREET=${VITE_IMPRESSUM_STREET}
|
|
- VITE_IMPRESSUM_CITY=${VITE_IMPRESSUM_CITY}
|
|
- VITE_IMPRESSUM_EMAIL=${VITE_IMPRESSUM_EMAIL}
|
|
- VITE_IMPRESSUM_PHONE=${VITE_IMPRESSUM_PHONE}
|
|
container_name: holy-frontend
|
|
restart: unless-stopped
|
|
networks:
|
|
- narl
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=narl"
|
|
- "traefik.http.routers.holy-energy-frontend.priority=10"
|
|
- "traefik.http.routers.holy-energy-frontend.rule=Host(`${DOMAIN:-holy.narl.io}`)"
|
|
- "traefik.http.routers.holy-energy-frontend.entrypoints=websecure"
|
|
- "traefik.http.routers.holy-energy-frontend.tls.certresolver=https_resolver"
|
|
- "traefik.http.services.holy-energy-frontend.loadbalancer.server.port=80"
|
|
|
|
networks:
|
|
narl:
|
|
external: true
|
|
internal:
|
|
internal: true
|
|
|
|
volumes:
|
|
db_data:
|