Files
ember-market-frontend/docker-compose.yml
2025-03-09 00:22:11 +00:00

43 lines
1.4 KiB
YAML

version: '3.8'
services:
traefik:
image: traefik:v2.5
container_name: traefik
command:
- "--api.insecure=true" # Enable Traefik dashboard (ensure security for production)
- "--log.level=DEBUG" # Enable DEBUG level logs
- "--accesslog" # Enable access logs
- "--entrypoints.web.address=:80" # Listen on port 80 (HTTP)
- "--entrypoints.websecure.address=:443" # Listen on port 443 (HTTPS)
ports:
- "80:80" # Expose HTTP port 80
- "443:443" # Expose HTTPS port 443
- "8080:8080" # Traefik Dashboard (ensure to secure this in production)
volumes:
- "/var/run/docker.sock:/var/run/docker.sock" # Allow Traefik to interact with Docker
networks:
- web
labels:
- "traefik.enable=true"
nextjs-app:
build:
context: . # Path to your project
dockerfile: Dockerfile
container_name: nextjs-app-container
expose:
- "3000" # Expose port 3000 internally (Traefik will route traffic to this port)
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`dash.embermarket.app`)" # Match your domain
- "traefik.http.services.dashboard.loadbalancer.server.port=3000"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
restart: unless-stopped
networks:
web:
external: true