Parameterise Traefik stack name

This commit is contained in:
3wc 2020-09-07 19:55:25 +02:00
parent 085856f21a
commit d95ecfed86

View File

@ -26,6 +26,7 @@ services:
image: 'revianlabs/mediawiki-ve-bundle'
environment:
- DOMAIN=${DOMAIN}
- STACK_NAME=${STACK_NAME}
volumes:
- 'mediawiki:/var/www/html'
- 'parsoid:/usr/lib/parsoid'
@ -39,10 +40,10 @@ services:
failure_action: rollback
labels:
- "traefik.enable=true"
- "traefik.http.services.mediawiki.loadbalancer.server.port=80"
- "traefik.http.routers.mediawiki.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.mediawiki.entrypoints=web-secure"
- "traefik.http.routers.mediawiki.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
volumes:
mariadb:
@ -56,8 +57,8 @@ networks:
secrets:
db_root_password:
name: ${STACK_NAME}_db_root_passwd_${DB_ROOT_PASSWD_VERSION}
name: ${STACK_NAME}_db_root_password_${DB_ROOT_PASSWD_VERSION}
external: true
db_password:
name: ${STACK_NAME}_db_passwd_${DB_PASSWD_VERSION}
name: ${STACK_NAME}_db_password_${DB_PASSWD_VERSION}
external: true