Add WordPress multisite option

This commit is contained in:
Kris Lamoureux 2021-03-13 18:55:15 -05:00
parent ae7b111a0c
commit e585cc3f99
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
4 changed files with 18 additions and 0 deletions

View File

@ -17,7 +17,17 @@ traefik_auth: admin:$apr1$T1l.BCFz$Jyg8msXYEAUi3LLH39I9d1 # admin:admin
# container settings # container settings
wordpress_version: latest wordpress_version: latest
wordpress_domain: wordpress.vm.krislamo.org wordpress_domain: wordpress.vm.krislamo.org
wordpress_multisite: true
# database settings # database settings
wordpress_dbversion: latest wordpress_dbversion: latest
wordpress_dbpass: password wordpress_dbpass: password
# multisite (enable in admin panel then uncomment)
#wordpress_config_extra: |
# define('MULTISITE', {{ wordpress_multisite | string }});
# define('SUBDOMAIN_INSTALL', true);
# define('DOMAIN_CURRENT_SITE', '{{ wordpress_domain }}');
# define('PATH_CURRENT_SITE', '/');
# define('SITE_ID_CURRENT_SITE', 1);
# define('BLOG_ID_CURRENT_SITE', 1);

View File

@ -1,3 +1,8 @@
# settings
wordpress_multisite: false
wordpress_config_extra: |
define('WP_ALLOW_MULTISITE', {{ wordpress_multisite | string }} );
# container names # container names
wordpress_container: wordpress wordpress_container: wordpress
wordpress_dbcontainer: "{{ wordpress_container }}-db" wordpress_dbcontainer: "{{ wordpress_container }}-db"

View File

@ -31,3 +31,4 @@
WORDPRESS_DB_USER: "{{ wordpress_dbuser }}" WORDPRESS_DB_USER: "{{ wordpress_dbuser }}"
WORDPRESS_DB_PASSWORD: "{{ wordpress_dbpass }}" WORDPRESS_DB_PASSWORD: "{{ wordpress_dbpass }}"
WORDPRESS_DB_HOST: "{{ wordpress_dbcontainer }}" WORDPRESS_DB_HOST: "{{ wordpress_dbcontainer }}"
WORDPRESS_CONFIG_EXTRA: "{{ wordpress_config_extra }}"

View File

@ -11,6 +11,8 @@ HOST[5]="grafana.${DOMAIN}"
HOST[6]="nginx.${DOMAIN}" HOST[6]="nginx.${DOMAIN}"
HOST[7]="vault.${DOMAIN}" HOST[7]="vault.${DOMAIN}"
HOST[8]="wordpress.${DOMAIN}" HOST[8]="wordpress.${DOMAIN}"
HOST[9]="site1.wordpress.${DOMAIN}"
HOST[10]="site2.wordpress.${DOMAIN}"
# Get Vagrantbox guest IP # Get Vagrantbox guest IP
VAGRANT_OUTPUT=$(vagrant ssh -c "hostname -I | cut -d' ' -f2" 2>/dev/null) VAGRANT_OUTPUT=$(vagrant ssh -c "hostname -I | cut -d' ' -f2" 2>/dev/null)