version: '3' services: # Traefik reverse proxy traefik: image: traefik:v2.5 container_name: traefik command: - "--api.insecure=true" # Enable Traefik dashboard - "--log.level=DEBUG" # Enable DEBUG level logs - "--accesslog" # Enable access logs - "--entrypoints.web.address=:80" # Listen on port 80 - "--entrypoints.websecure.address=:443" # Listen on port 443 ports: - "80:80" # Expose port 80 - "443:443" # Expose port 443 - "8080:8080" # Traefik Dashboard (ensure this is only exposed if secure) volumes: - "/var/run/docker.sock:/var/run/docker.sock" # Allow Traefik to interact with Docker networks: - web labels: - "traefik.enable=true" # Next.js application nextjs-app: build: context: . dockerfile: Dockerfile container_name: nextjs-app-container expose: - "3000" # Expose Next.js app inside the Docker network environment: - NODE_ENV=production - NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api labels: - "traefik.enable=true" - "traefik.http.routers.dashboard.rule=Host(`dash.embermarket.app`)" # Use AEZA as reverse proxy - "traefik.http.services.dashboard.loadbalancer.server.port=3000" restart: unless-stopped