maj exemple app ajouté

This commit is contained in:
Grégory Lebreton 2023-07-29 19:37:39 +02:00
parent ccbbf616c1
commit 1823b2bfdd
2 changed files with 22 additions and 2 deletions

2
.env
View File

@ -1,3 +1,5 @@
# TRAEFIK ENVIRONMENTS VARS
DOMAIN=
APP=
ACME_EMAIL=

View File

@ -37,11 +37,11 @@ services:
container_name: whoami
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
- "traefik.http.routers.whoami.rule=Host(`whoami.${DOMAIN}`)"
- "traefik.http.routers.whoami.entrypoints=web"
# HTTPS
# - traefik.http.routers.whoami-ssl.rule=Host(`whoami.localhost`)
# - traefik.http.routers.whoami-ssl.rule=Host(`whoami.${DOMAIN}`)
# - traefik.http.routers.whoami-ssl.entryPoints=websecure
# - traefik.http.routers.whoami-ssl.tls=true
# - traefik.http.routers.whoami-ssl.service=whoami
@ -49,5 +49,23 @@ services:
networks:
traefik_net:
# EXEMPLE APP (SUBDOMAIN)
app:
image: repository/image:tag
container_name: app
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`${APP}.${DOMAIN}`)"
- "traefik.http.routers.app.entrypoints=web"
# HTTPS
# - traefik.http.routers.app-ssl.rule=Host(`${APP}.${DOMAIN}`)
# - traefik.http.routers.app-ssl.entryPoints=websecure
# - traefik.http.routers.app-ssl.tls=true
# - traefik.http.routers.app-ssl.service=app
# - traefik.http.routers.app-ssl.tls.certresolver=le
networks:
traefik_net:
networks:
traefik_net: