Update docker-compose.yml
This commit is contained in:
@@ -5,15 +5,15 @@ services:
|
|||||||
image: traefik:v2.5
|
image: traefik:v2.5
|
||||||
container_name: traefik
|
container_name: traefik
|
||||||
command:
|
command:
|
||||||
- "--api.insecure=true" # Enable Traefik dashboard
|
- "--api.insecure=true" # Enable Traefik dashboard (ensure security for production)
|
||||||
- "--log.level=DEBUG" # Enable DEBUG level logs
|
- "--log.level=DEBUG" # Enable DEBUG level logs
|
||||||
- "--accesslog" # Enable access logs
|
- "--accesslog" # Enable access logs
|
||||||
- "--entrypoints.web.address=:80" # Listen on port 80
|
- "--entrypoints.web.address=:80" # Listen on port 80 (HTTP)
|
||||||
- "--entrypoints.websecure.address=:443" # Listen on port 443
|
- "--entrypoints.websecure.address=:443" # Listen on port 443 (HTTPS)
|
||||||
ports:
|
ports:
|
||||||
- "80:80" # Expose port 80
|
- "80:80" # Expose HTTP port 80
|
||||||
- "443:443" # Expose port 443
|
- "443:443" # Expose HTTPS port 443
|
||||||
- "8080:8080" # Traefik Dashboard (ensure this is only exposed if secure)
|
- "8080:8080" # Traefik Dashboard (ensure to secure this in production)
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock" # Allow Traefik to interact with Docker
|
- "/var/run/docker.sock:/var/run/docker.sock" # Allow Traefik to interact with Docker
|
||||||
networks:
|
networks:
|
||||||
@@ -27,12 +27,16 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: nextjs-app-container
|
container_name: nextjs-app-container
|
||||||
expose:
|
expose:
|
||||||
- "3000" # Expose port 3000 internally
|
- "3000" # Expose port 3000 internally (Traefik will route traffic to this port)
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.dashboard.rule=Host(`dash.embermarket.app`)"
|
- "traefik.http.routers.dashboard.rule=Host(`dash.embermarket.app`)" # Match your domain
|
||||||
- "traefik.http.services.dashboard.loadbalancer.server.port=3000"
|
- "traefik.http.services.dashboard.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:
|
||||||
|
external: true
|
||||||
|
|||||||
Reference in New Issue
Block a user