mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
updated docker-compose
This commit is contained in:
1 parent
952d15b6ca
commit
69c829e5dc
1 file changed
+20
-13
+20
-13
@@ -11,21 +11,26 @@ services:
|
||||
- narl
|
||||
- internal
|
||||
env_file:
|
||||
- ./.env
|
||||
- .env.narl.io
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ./legacy:/app/legacy
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/api/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=narl"
|
||||
# High priority for the backend specific paths
|
||||
- "traefik.http.routers.holy-backend.priority=20"
|
||||
- "traefik.http.routers.holy-backend.rule=Host(`holy.narl.io`) && PathPrefix(`/api`, `/admin`, `/static`, `/media`)"
|
||||
- "traefik.http.routers.holy-backend.entrypoints=websecure"
|
||||
- "traefik.http.routers.holy-backend.tls.certresolver=https_resolver"
|
||||
- "traefik.http.services.holy-backend.loadbalancer.server.port=8000"
|
||||
# Using a unique project-specific router name to avoid network conflicts
|
||||
- "traefik.http.routers.holy-energy-backend.priority=100"
|
||||
- "traefik.http.routers.holy-energy-backend.rule=Host(`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"
|
||||
|
||||
# --- Frontend Service (Nginx serving built React app) ---
|
||||
frontend:
|
||||
@@ -37,17 +42,19 @@ services:
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- narl
|
||||
env_file:
|
||||
- .env.narl.io
|
||||
depends_on:
|
||||
- backend
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=narl"
|
||||
# Low priority acts as the fallback catch-all
|
||||
- "traefik.http.routers.holy-frontend.priority=10"
|
||||
- "traefik.http.routers.holy-frontend.rule=Host(`holy.narl.io`)"
|
||||
- "traefik.http.routers.holy-frontend.entrypoints=websecure"
|
||||
- "traefik.http.routers.holy-frontend.tls.certresolver=https_resolver"
|
||||
- "traefik.http.services.holy-frontend.loadbalancer.server.port=80"
|
||||
# Lower priority fallback
|
||||
- "traefik.http.routers.holy-energy-frontend.priority=10"
|
||||
- "traefik.http.routers.holy-energy-frontend.rule=Host(`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:
|
||||
|
||||
Reference in new issue
Block a user