Add router rule variable for more flexibility

This commit is contained in:
Kris Lamoureux 2021-03-13 23:52:50 -05:00
parent e585cc3f99
commit 92bf67b15f
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
3 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,10 @@ wordpress_dbversion: latest
wordpress_dbpass: password
# multisite (enable in admin panel then uncomment)
#wordpress_rule: "Host(`{{ wordpress_domain }}`) ||
# Host(`site1.{{ wordpress_domain }}`) ||
# Host(`site2.{{ wordpress_domain }}`)"
#
#wordpress_config_extra: |
# define('MULTISITE', {{ wordpress_multisite | string }});
# define('SUBDOMAIN_INSTALL', true);

View File

@ -1,5 +1,6 @@
# settings
wordpress_multisite: false
wordpress_rule: "Host(`{{ wordpress_domain }}`)"
wordpress_config_extra: |
define('WP_ALLOW_MULTISITE', {{ wordpress_multisite | string }} );

View File

@ -18,7 +18,7 @@
volumes:
- "{{ wordpress_docroot }}:/var/www/html"
labels:
traefik.http.routers.wordpress.rule: "Host(`{{ wordpress_domain }}`)"
traefik.http.routers.wordpress.rule: "{{ wordpress_rule }}"
traefik.http.routers.wordpress.entrypoints: websecure
traefik.http.routers.wordpress.tls.certresolver: letsencrypt
traefik.http.routers.wordpress.middlewares: securehttps@file