2024-10-08 13:35:35 +08:00
|
|
|
services:
|
|
|
|
app:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
2024-10-08 14:11:14 +08:00
|
|
|
container_name: allAndOne
|
2024-10-08 14:21:22 +08:00
|
|
|
|
2024-10-08 13:35:35 +08:00
|
|
|
env_file:
|
2024-10-08 14:17:22 +08:00
|
|
|
- .env
|
2024-10-08 13:35:35 +08:00
|
|
|
ports:
|
2024-10-08 14:21:22 +08:00
|
|
|
- "3000:3000"
|
2024-10-08 13:35:35 +08:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
- /app/node_modules
|
2024-10-08 14:28:10 +08:00
|
|
|
- /app/.next
|
2024-10-08 13:35:35 +08:00
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.docker.network=traefik-public
|
|
|
|
- traefik.constraint-label=traefik-public
|
|
|
|
|
2024-10-08 15:40:50 +08:00
|
|
|
# - traefik.http-allAndOne.loadbalancer.server.port=80
|
2024-10-08 13:35:35 +08:00
|
|
|
|
2024-10-08 15:37:24 +08:00
|
|
|
# - traefik.http.routers.allAndOne-http.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`)
|
|
|
|
# - traefik.http.routers.allAndOne-http.entrypoints=http
|
|
|
|
|
|
|
|
# - traefik.http.routers.allAndOne-https.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`)
|
|
|
|
# - traefik.http.routers.allAndOne-https.entrypoints=https
|
|
|
|
# - traefik.http.routers.allAndOne-https.tls=true
|
|
|
|
# - traefik.http.routers.allAndOne-https.tls.certresolver=le
|
|
|
|
|
2024-10-08 15:51:01 +08:00
|
|
|
- traefik.basic.allinone.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`)
|
2024-10-08 15:52:59 +08:00
|
|
|
- "traefik.basic.port=80"
|
2024-10-08 15:37:24 +08:00
|
|
|
- "traefik.basic.protocol=http"
|
2024-10-08 13:35:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Enable www redirection for HTTP and HTTPS
|
2024-10-08 15:37:24 +08:00
|
|
|
# - traefik.http.routers.allAndOne-https.middlewares=www-redirect
|
|
|
|
# - traefik.http.routers.allAndOne-http.middlewares=https-redirect,www-redirect
|
2024-10-08 13:35:35 +08:00
|
|
|
networks:
|
|
|
|
- traefik-public
|
2024-10-08 14:21:22 +08:00
|
|
|
- default
|
|
|
|
networks:
|
|
|
|
traefik-public:
|
|
|
|
# Allow setting it to false for testing
|
|
|
|
external: true
|