mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-02-23 21:01:53 +01:00
66 lines
2.0 KiB
Django/Jinja
66 lines
2.0 KiB
Django/Jinja
services:
|
|
|
|
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
|
|
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
|
|
application:
|
|
image: "nextcloud:{{applications.nextcloud.version}}-fpm-alpine"
|
|
container_name: {{nextcloud_application_container_name}}
|
|
volumes:
|
|
- data:/var/www/html
|
|
healthcheck:
|
|
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php /var/www/html/occ status"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
|
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
|
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
ipv4_address: 192.168.102.66
|
|
|
|
web:
|
|
image: nginx:alpine
|
|
container_name: {{nextcloud_nginx_container_name}}
|
|
logging:
|
|
driver: journald
|
|
restart: {{docker_restart_policy}}
|
|
ports:
|
|
- "127.0.0.1:{{http_port}}:80"
|
|
volumes:
|
|
- "{{docker_compose.directories.volumes}}nginx.conf:/etc/nginx/nginx.conf:ro"
|
|
volumes_from:
|
|
- application
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:80/"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
networks:
|
|
default:
|
|
ipv4_address: 192.168.102.67
|
|
|
|
cron:
|
|
container_name: nextcloud-cron
|
|
image: "nextcloud:{{applications.nextcloud.version}}-fpm-alpine"
|
|
restart: {{docker_restart_policy}}
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
- data:/var/www/html
|
|
entrypoint: /cron.sh
|
|
healthcheck:
|
|
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php /var/www/html/occ status"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
|
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
ipv4_address: 192.168.102.68
|
|
|
|
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
data:
|
|
redis:
|
|
|
|
{% include 'templates/docker/compose/networks.yml.j2' %}
|