diff --git a/docker-compose.yml b/docker-compose.yml index 32fc432..1577e73 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: image: traefik:v2.5 container_name: traefik command: - - "--api.insecure=true" # Enable Traefik dashboard + - "--api.insecure=true" # Enable Traefik dashboard (optional) - "--log.level=DEBUG" # Enable DEBUG level logs - "--accesslog" # Enable access logs - "--entrypoints.web.address=:80" # Listen on port 80 @@ -14,7 +14,7 @@ services: ports: - "80:80" # Expose port 80 - "443:443" # Expose port 443 - - "8080:8080" # Traefik Dashboard (ensure this is exposed securely) + - "8080:8080" # Traefik Dashboard (optional) volumes: - "/var/run/docker.sock:/var/run/docker.sock" # Allow Traefik to interact with Docker networks: @@ -33,8 +33,13 @@ services: - "traefik.enable=true" - "traefik.http.routers.nextjs-app.rule=Host(`dash.embermarket.app`)" - "traefik.http.services.nextjs-app.loadbalancer.server.port=3000" - - "traefik.http.middlewares.ip-whitelist.ipWhiteList.sourcerange=212.113.116.6,194.26.229.41,138.124.13.13" - - "traefik.http.routers.nextjs-app.middlewares=ip-whitelist" + + # IP Whitelist middleware for the Next.js app + - "traefik.http.routers.nextjs-app.middlewares=ip-whitelist" # Apply the IP whitelist middleware + + # Define the IP whitelist middleware for the Next.js app + - "traefik.http.middlewares.ip-whitelist.ipWhiteList.sourcerange=212.113.116.6,194.26.229.41,138.124.13.13" # Allowed IPs + environment: - NODE_ENV=production - NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api