Update docker-compose.yml
This commit is contained in:
@@ -5,25 +5,22 @@ services:
|
|||||||
image: traefik:v2.5
|
image: traefik:v2.5
|
||||||
container_name: traefik
|
container_name: traefik
|
||||||
command:
|
command:
|
||||||
- "--api.insecure=true"
|
- "--api.insecure=true" # Enable Traefik dashboard
|
||||||
- "--log.level=DEBUG"
|
- "--log.level=DEBUG" # Enable DEBUG level logs
|
||||||
- "--accesslog"
|
- "--accesslog" # Enable access logs
|
||||||
- "--entrypoints.web.address=:80"
|
- "--entrypoints.web.address=:80" # Listen on port 80
|
||||||
- "--entrypoints.websecure.address=:443" # Still listen on 443, but traffic will be HTTP after passing through AEZA
|
- "--entrypoints.websecure.address=:443" # Listen on port 443
|
||||||
- "--entrypoints.websecure.http.middlewares=ssl-redirect" # Redirect HTTP to HTTPS if required
|
- "--entrypoints.websecure.forwardedHeaders.insecure=true" # Allow forwarded headers
|
||||||
ports:
|
ports:
|
||||||
- "80:80" # Expose port 80 for HTTP
|
- "80:80" # Expose port 80
|
||||||
- "443:443" # Expose port 443 for HTTPS (AEZA will handle SSL termination)
|
- "443:443" # Expose port 443
|
||||||
- "8080:8080" # Traefik dashboard, ensure it's secure if exposed
|
- "8080:8080" # Traefik Dashboard
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock" # Allow Traefik to interact with Docker
|
||||||
- "/path/to/acme.json:/acme.json" # Path to store Let's Encrypt certs (if using)
|
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.dashboard.rule=Host(`dash.embermarket.app`)"
|
|
||||||
- "traefik.http.services.dashboard.loadbalancer.server.port=3000"
|
|
||||||
|
|
||||||
nextjs-app:
|
nextjs-app:
|
||||||
build:
|
build:
|
||||||
@@ -31,15 +28,17 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: nextjs-app-container
|
container_name: nextjs-app-container
|
||||||
expose:
|
expose:
|
||||||
- "3000" # Expose port 3000 internally (Traefik will route traffic to this port)
|
- "3000" # Expose port 3000 internally (not externally)
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.dashboard.rule=Host(`dash.embermarket.app`)" # Match your domain
|
- "traefik.http.routers.nextjs-app.rule=Host(`dash.embermarket.app`)"
|
||||||
- "traefik.http.services.dashboard.loadbalancer.server.port=3000"
|
- "traefik.http.services.nextjs-app.loadbalancer.server.port=3000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
|
- NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
web:
|
web:
|
||||||
|
|||||||
Reference in New Issue
Block a user