Files
server-infra/roles/wordpress/templates/docker-compose.yml.j2
T
westfarn 6f05242ca7
Sync runner checkout / sync (push) Successful in 7s
Generate WordPress compose from the site list during provision.
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.
2026-10-08 05:08:16 -05:00

22 lines
873 B
Django/Jinja

# 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