Files
deploy.stack/traefik/stack.yml
cnphpbb e51f84f6e1 feat(traefik): 添加traefik配置文件和docker-compose部署文件
添加traefik相关配置文件包括环境变量、主配置、动态配置和docker-compose部署文件
更新tasks.md中的docker compose命令语法
2025-08-28 17:34:26 +08:00

38 lines
1.0 KiB
YAML

#
# Traefik
# RUN: docker compose -p traefik --env-file ./traefik/env.cfg -f ./traefik/stack.yml up -d
# PULL: docker compose -p traefik --env-file ./traefik/env.cfg -f ./traefik/stack.yml pull
services:
traefik:
image: ${IMAGE_TAG_LATEST}
container_name: traefik
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/traefik.yml:/traefik.yml:ro
- ./data/acme.json:/acme.json
# Add folder with dynamic configuration yml
- ./data/configurations:/configurations
networks:
- traefik-proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik.rule=Host(`traefik.6t7.com`)"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=le"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
traefik-proxy:
external: true