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

44 lines
1.4 KiB
YAML

version: '3.8'
services:
# Next.js Application Service
nextjs:
image: your-nextjs-image # Replace this with your custom Next.js Docker image
container_name: nextjs_app
build: .
environment:
- NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
ports:
- "3000:3000" # Expose port 3000 for the Next.js application
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextjs.rule=Host(`dash.embermarket.app`)" # Replace with your domain
- "traefik.http.services.nextjs.loadbalancer.server.port=3000" # Expose Next.js on port 3000
networks:
- web
# Traefik Reverse Proxy Service
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"
networks:
web:
external: true