49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
traefik:
|
|
image: traefik:v2.5
|
|
container_name: traefik
|
|
command:
|
|
- "--api.insecure=true"
|
|
- "--log.level=DEBUG"
|
|
- "--accesslog"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.network=web"
|
|
- "--entrypoints.web.address=:80"
|
|
- "--entrypoints.websecure.address=:443"
|
|
- "--entrypoints.websecure.forwardedHeaders.trustedIPs=212.113.116.6,194.26.229.41,138.124.13.13"
|
|
- "--providers.file.filename=/etc/traefik/traefik.yml" # Load the configuration file for middleware
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "8080:8080"
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
- "./traefik.yml:/etc/traefik/traefik.yml" # Mount the config file to Traefik container
|
|
networks:
|
|
- web
|
|
|
|
nextjs-app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: nextjs-app-container
|
|
expose:
|
|
- "3000"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.nextjs-app.rule=Host(`dash.embermarket.app`) || PathPrefix(`/`)"
|
|
- "traefik.http.services.nextjs-app.loadbalancer.server.port=3000"
|
|
- "traefik.http.routers.nextjs-app.entrypoints=websecure"
|
|
networks:
|
|
- web
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
web:
|
|
external: true
|