Generate WordPress compose from the site list during provision.
Sync runner checkout / sync (push) Successful in 7s
Sync runner checkout / sync (push) Successful in 7s
Each host mounts wp-content and gets a compose file from inventory instead of a hand-copied one. Also allow LAN TCP 8020 so abc_voice is reachable through UFW.
This commit is contained in:
1 parent
f4219e2dca
commit
6f05242ca7
12 files changed
+555
-8
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Managed by Ansible (roles/wordpress). Do not edit by hand.
|
||||
name: {{ item.name if (item.name is match('.*_beta$')) else (item.name ~ '_prod') }}
|
||||
services:
|
||||
wordpress:
|
||||
image: {{ item.image | default(wordpress_image) }}
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- {{ apps_env_dir }}/{{ item.name if (item.name is match('.*_beta$')) else (item.name ~ '_prod') }}.env
|
||||
ports:
|
||||
- "{{ item.port }}:80"
|
||||
environment:
|
||||
WORDPRESS_CONFIG_EXTRA: |
|
||||
define('WP_HOME', '{{ item.url }}');
|
||||
define('WP_SITEURL', '{{ item.url }}');
|
||||
define('DISABLE_WP_CRON', true);
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
|
||||
$_SERVER['HTTPS'] = 'on';
|
||||
}
|
||||
define('FORCE_SSL_ADMIN', true);
|
||||
volumes:
|
||||
- {{ item.mount }}:/var/www/html/wp-content
|
||||
Reference in new issue
Block a user