2020-03-31 16:32:13 +00:00
|
|
|
version: '3'
|
|
|
|
|
2020-05-06 10:11:46 +00:00
|
|
|
# Generated by ansible for site {{ site.url }}
|
|
|
|
# On network {{ site.subnet_cidr_address }}:
|
|
|
|
# - web server (nginx) at {{ site.subnet_nginx_ip }}
|
|
|
|
# - php-fpm (wordpress) at {{ site.subnet_site_ip }}
|
2020-03-31 16:32:13 +00:00
|
|
|
|
|
|
|
services:
|
2020-05-01 13:40:16 +00:00
|
|
|
site:
|
|
|
|
build: site
|
2020-03-31 16:32:13 +00:00
|
|
|
restart: always
|
|
|
|
environment:
|
2020-05-06 10:11:46 +00:00
|
|
|
WORDPRESS_DB_HOST: "{{ site.subnet_gateway_ip }}"
|
|
|
|
WORDPRESS_DB_USER: "{{ site.mysql_username }}"
|
|
|
|
WORDPRESS_DB_PASSWORD: "{{ site.mysql_password }}"
|
|
|
|
WORDPRESS_DB_NAME: "{{ site.mysql_database }}"
|
2020-04-09 15:29:12 +00:00
|
|
|
volumes:
|
2020-05-01 13:40:16 +00:00
|
|
|
- "html_data:/var/www/html"
|
2020-05-05 09:08:24 +00:00
|
|
|
- "{{ site_data_path }}:/var/www/html/wp-content"
|
2020-03-31 16:32:13 +00:00
|
|
|
networks:
|
|
|
|
net:
|
2020-05-06 10:11:46 +00:00
|
|
|
ipv4_address: "{{ site.subnet_site_ip }}"
|
2020-03-31 16:32:13 +00:00
|
|
|
|
2020-05-01 13:40:16 +00:00
|
|
|
nginx:
|
|
|
|
build: nginx
|
|
|
|
restart: always
|
|
|
|
depends_on:
|
|
|
|
- site
|
|
|
|
volumes:
|
|
|
|
- "html_data:/var/www/html"
|
2020-05-05 09:08:24 +00:00
|
|
|
- "{{ site_data_path }}:/var/www/html/wp-content"
|
2020-05-01 13:40:16 +00:00
|
|
|
networks:
|
|
|
|
net:
|
2020-05-06 10:11:46 +00:00
|
|
|
ipv4_address: "{{ site.subnet_nginx_ip }}"
|
2020-05-01 13:40:16 +00:00
|
|
|
|
|
|
|
|
2020-03-31 16:32:13 +00:00
|
|
|
networks:
|
|
|
|
net:
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2020-05-06 10:11:46 +00:00
|
|
|
- subnet: "{{ site.subnet_cidr_address }}"
|
2020-05-01 13:40:16 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
html_data:
|