41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
services:
|
|
traefik:
|
|
image: traefik:v3.7.5
|
|
container_name: traefik
|
|
restart: unless-stopped
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
environment:
|
|
- CF_API_EMAIL=${CF_API_EMAIL}
|
|
- CF_API_KEY=${CF_API_KEY}
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./config.yml:/etc/traefik/traefik.yml:ro
|
|
- ./middleware.yml:/etc/traefik/middleware.yml:ro
|
|
- ./acme.json:/acme.json
|
|
networks:
|
|
- public
|
|
|
|
whoami:
|
|
image: traefik/whoami
|
|
container_name: whoami
|
|
restart: unless-stopped
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.whoami.rule=Host(`whoami.bnb1.net`)"
|
|
- "traefik.http.routers.whoami.entrypoints=https"
|
|
- "traefik.http.routers.whoami.middlewares=secure-headers@file"
|
|
- "traefik.http.routers.whoami.tls=true"
|
|
- "traefik.http.services.whoami.loadbalancer.server.port=80"
|
|
networks:
|
|
- public
|
|
|
|
networks:
|
|
public:
|
|
name: public |