mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 20:51:07 +01:00
61 lines
1.7 KiB
Django/Jinja
61 lines
1.7 KiB
Django/Jinja
version: '3'
|
|
|
|
services:
|
|
|
|
{% include 'templates/docker-service-redis.yml.j2' %}
|
|
|
|
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
|
|
|
|
application:
|
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
|
container_name: nextcloud-application
|
|
restart: {{docker_restart_policy}}
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
- data:/var/www/html
|
|
environment:
|
|
MYSQL_DATABASE: "{{database_name}}"
|
|
MYSQL_USER: "{{database_username}}"
|
|
MYSQL_PASSWORD: "{{database_password}}"
|
|
MYSQL_HOST: {{database_host}}:3306
|
|
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
|
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
|
|
web:
|
|
image: nginx:alpine
|
|
container_name: nextcloud-web
|
|
logging:
|
|
driver: journald
|
|
restart: {{docker_restart_policy}}
|
|
ports:
|
|
- "127.0.0.1:{{http_port}}:80"
|
|
volumes:
|
|
- "{{path_docker_volumes}}nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro"
|
|
volumes_from:
|
|
- application
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:80/"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
|
|
cron:
|
|
container_name: nextcloud-cron
|
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
|
restart: {{docker_restart_policy}}
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
- data:/var/www/html
|
|
entrypoint: /cron.sh
|
|
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
|
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
|
|
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
|
data:
|
|
redis:
|
|
|
|
{% include 'templates/docker-compose-networks.yml.j2' %}
|