frondend/docker-compose.yml

35 lines
1.2 KiB
YAML
Raw Normal View History

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 16:02:08 +08:00
- traefik.http.routers.${STACK_NAME?Variable not set}-app-http.rule=Host(`${DOMAIN?Variable not set}`)
- traefik.http.routers.${STACK_NAME?Variable not set}-app-http.entrypoints=http
- traefik.http.routers.${STACK_NAME?Variable not set}-app-http.middlewares=https-redirect
- traefik.http.routers.${STACK_NAME?Variable not set}-app-https.rule=Host(`${DOMAIN?Variable not set}`)
- traefik.http.routers.${STACK_NAME?Variable not set}-app-https.entrypoints=https
- traefik.http.routers.${STACK_NAME?Variable not set}-app-https.tls=true
- traefik.http.routers.${STACK_NAME?Variable not set}-app-https.tls.certresolver=le
- traefik.http.services.${STACK_NAME?Variable not set}-app.loadbalancer.server.port=3000
2024-10-08 13:35:35 +08:00
networks:
- traefik-public
2024-10-08 14:21:22 +08:00
networks:
traefik-public:
# Allow setting it to false for testing
external: true