Update environment configuration and enhance Docker setup for production deployment
- Changed NODE_ENV from development to production in .env.example for production readiness. - Updated WEBUI_URL to point to the new public URL behind Traefik. - Added internal and external networks in docker-compose.yml for improved service isolation and routing. - Removed direct port exposure for the WebUI, ensuring it is only accessible through Traefik. - Refactored landing and login pages in the WebUI to streamline navigation and error handling, redirecting users appropriately based on session status.
This commit is contained in:
@@ -7,6 +7,8 @@ services:
|
||||
POSTGRES_PASSWORD: nexumi
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- internal
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U nexumi -d nexumi"]
|
||||
interval: 5s
|
||||
@@ -18,6 +20,8 @@ services:
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
networks:
|
||||
- internal
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
@@ -36,6 +40,8 @@ services:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- backups:/backups
|
||||
networks:
|
||||
- internal
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
@@ -57,12 +63,16 @@ services:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "3000:3000"
|
||||
networks:
|
||||
- internal
|
||||
- traefik-network
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.nexumi.rule=Host(`nexumi.de`)"
|
||||
- "traefik.http.services.nexumi.loadbalancer.server.port=3000"
|
||||
- "traefik.docker.network=traefik-network"
|
||||
- "traefik.http.routers.nexumi-dashboard.rule=Host(`dashboard.nexumi.de`)"
|
||||
- "traefik.http.routers.nexumi-dashboard.entrypoints=websecure"
|
||||
- "traefik.http.routers.nexumi-dashboard.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.nexumi-dashboard.loadbalancer.server.port=3000"
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
@@ -78,3 +88,9 @@ volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
backups:
|
||||
|
||||
networks:
|
||||
traefik-network:
|
||||
external: true
|
||||
internal:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user