proxy/docker-compose.yml

43 lines
1.2 KiB
YAML
Raw Normal View History

2017-07-09 17:46:14 +02:00
version: '2'
services:
proxy:
2023-02-24 00:13:48 +01:00
image: traefik:v2.9
2017-07-09 17:46:14 +02:00
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
2017-07-09 17:46:14 +02:00
- "./cert/:/cert/"
- "./config/:/etc/traefik/:ro"
- "./config/dynamic/:/etc/traefik/dynamic/:ro"
2017-07-09 17:46:14 +02:00
labels:
2019-12-01 01:16:21 +01:00
- "traefik.enable=true" # set to true to expose the Monitoring & API
# middleware redirect
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# global redirect to https
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
- "traefik.docker.network=proxy_web"
2017-07-09 20:42:15 +02:00
networks:
- "web"
2017-07-09 17:46:14 +02:00
2019-12-01 08:21:43 +01:00
dumper:
image: ldez/traefik-certs-dumper:latest
volumes:
- "./cert/:/cert/"
- "/data/ssl/:/ssl/"
command: >
file --watch --source /cert/acme.json --version v2 --domain-subdir
--crt-name=fullchain --crt-ext=.pem
--key-name=privkey --key-ext=.pem
--clean=false
2020-05-27 00:28:20 +02:00
--post-hook "chmod -R a+r /ssl/"
2019-12-01 08:21:43 +01:00
--dest /ssl
2017-07-09 17:46:14 +02:00
networks:
2017-07-09 19:24:09 +02:00
web:
2017-07-09 17:46:14 +02:00
driver: bridge