simplified .env configuration with DOMAIN-based defaults and improved docker-compose orchestration

This commit is contained in:
nvrl committed 2026-02-19 18:27:19 +01:00
1 parent 2da6c8e240
commit 8d3e8ebf18
3 files changed
+32 -22

No files matched your search

+6 -3
View File
@@ -14,6 +14,7 @@ services:
- ./legacy:/app/legacy
environment:
- PYTHONUNBUFFERED=1
- DOMAIN=${DOMAIN:-holy.narl.io}
dns:
- 8.8.8.8
- 1.1.1.1
@@ -22,7 +23,7 @@ services:
- "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(`holy.narl.io`) && (PathPrefix(`/api`) || PathPrefix(`/admin/`) || PathPrefix(`/static`) || PathPrefix(`/media`))"
- "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"
@@ -46,6 +47,8 @@ services:
- 1.1.1.1
env_file:
- .env
environment:
- DOMAIN=${DOMAIN:-holy.narl.io}
volumes:
- ./backend:/app
- ./legacy:/app/legacy
@@ -57,7 +60,7 @@ services:
build:
context: ./frontend
args:
- VITE_API_URL=https://holy.narl.io/api/
- 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}
@@ -76,7 +79,7 @@ services:
- "traefik.enable=true"
- "traefik.docker.network=narl"
- "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.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"