51 lines
1.6 KiB
YAML
51 lines
1.6 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,77.73.131.156" # Trust IPs for websecure
|
|
- "--entrypoints.web.forwardedHeaders.trustedIPs=212.113.116.6,194.26.229.41,138.124.13.13,77.73.131.156" # Trust IPs for web
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "8080:8080"
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
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`) || Host(`77.73.131.156`) || PathPrefix(`/`)"
|
|
- "traefik.http.services.nextjs-app.loadbalancer.server.port=3000"
|
|
- "traefik.http.routers.nextjs-app-https.rule=Host(`dash.embermarket.app`) || Host(`77.73.131.156`) || PathPrefix(`/`)"
|
|
- "traefik.http.middlewares.redirect-to-http.redirectscheme=http"
|
|
- "traefik.http.routers.nextjs-app-https.middlewares=redirect-to-http"
|
|
|
|
networks:
|
|
- web
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NEXT_PUBLIC_API_URL=/api
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
web:
|
|
external: true
|