automation/deployer/roles/build/templates/nextcloud/docker-compose.yml.j2
2020-09-23 12:45:03 +02:00

44 lines
1.1 KiB
Django/Jinja

version: '3'
# Generated by ansible for site {{ site.url }}
# On network {{ site.subnet_cidr_address }}:
# - web server (nginx) at {{ site.subnet_nginx_ip }}
# - php-fpm (nextcloud) at {{ site.subnet_site_ip }}
services:
site:
image: nextcloud:{{ nextcloud.version }}-fpm
restart: always
environment:
MYSQL_HOST: "{{ site.subnet_gateway_ip }}"
MYSQL_USER: "{{ site.mysql_username }}"
MYSQL_PASSWORD: "{{ site.mysql_password }}"
MYSQL_DATABASE: "{{ site.mysql_database }}"
volumes:
- "{{ site_data_path }}:/var/www/html"
# These can be populated with existing content
# So make it another volume
- "{{ site_data_path }}/config:/var/www/html/config"
- "{{ site_data_path }}/data:/var/www/html/data"
networks:
net:
ipv4_address: "{{ site.subnet_site_ip }}"
nginx:
build: nginx
restart: always
depends_on:
- site
volumes:
- "{{ site_data_path }}:/var/www/html"
networks:
net:
ipv4_address: "{{ site.subnet_nginx_ip }}"
networks:
net:
ipam:
driver: default
config:
- subnet: "{{ site.subnet_cidr_address }}"