mirror of
https://github.com/atareao/self-hosted.git
synced 2024-07-06 14:02:16 +02:00
39 lines
988 B
YAML
39 lines
988 B
YAML
version: "3.7"
|
|
|
|
services:
|
|
traefik:
|
|
image: traefik:v2.10
|
|
container_name: traefik
|
|
init: true
|
|
restart: unless-stopped
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
networks:
|
|
- proxy
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
environment:
|
|
- TZ=Europe/Madrid
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./config/traefik.yml:/traefik.yml:ro
|
|
- ./config/dynamic.yml:/dynamic.yml:ro
|
|
- ./config/users.txt:/users.txt:ro
|
|
- ./config/acme.json:/acme.json
|
|
- logs:/var/log/traefik
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.services.traefik.loadbalancer.server.port=80
|
|
- traefik.http.routers.traefik-secure.entrypoints=websecure
|
|
- traefik.http.routers.traefik-secure.rule=Host(`${FQDN}`)
|
|
- traefik.http.routers.traefik-secure.middlewares=myauth@file
|
|
- traefik.http.routers.traefik-secure.service=api@internal
|
|
|
|
volumes:
|
|
logs: {}
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|