totp.bjphoster.com/docker-compose.yml

28 lines
981 B
YAML
Raw Normal View History

2021-08-13 12:49:02 +02:00
version: "3"
services:
2021-08-13 15:12:36 +02:00
web:
2021-08-13 12:49:02 +02:00
container_name: ${TOTP_CONTAINER_NAME}
image: bryanpedini/go-totp:${TOTP_VERSION}
labels:
- traefik.enable=true
### Section HTTP
- traefik.routers.http-totp_bjphoster_com.entrypoints=http
# redirect to HTTPS only
2021-08-13 15:14:51 +02:00
- traefik.http.routers.http-totp_bjphoster_com.middlewares=http-to-https
- traefik.http.routers.http-totp_bjphoster_com.rule=Host(`totp.bjphoster.com`)
2021-08-13 12:49:02 +02:00
### Section HTTPS
2021-08-13 15:14:51 +02:00
- traefik.http.routers.https-totp_bjphoster_com.entrypoints=https
2021-08-13 12:49:02 +02:00
# configure the exposed service
2021-08-13 15:14:51 +02:00
- traefik.http.routers.https-totp_bjphoster_com.rule=Host(`totp.bjphoster.com`)
2021-08-13 12:49:02 +02:00
# of course, enable TLS and it's certificate provider
2021-08-13 15:14:51 +02:00
- traefik.http.routers.https-totp_bjphoster_com.tls=true
- traefik.http.routers.https-totp_bjphoster_com.tls.certresolver=letsencrypt
2021-08-13 15:13:36 +02:00
networks:
- traefik-proxy
2021-08-13 12:49:02 +02:00
restart: unless-stopped
2021-08-13 15:13:36 +02:00
networks:
traefik-proxy:
external: true