mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-23 10:45:03 +01:00
71 lines
1.7 KiB
Django/Jinja
71 lines
1.7 KiB
Django/Jinja
version: '3'
|
|
|
|
services:
|
|
application:
|
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
|
restart: always
|
|
logging:
|
|
driver: journald
|
|
depends_on:
|
|
- database
|
|
volumes:
|
|
- data:/var/www/html
|
|
environment:
|
|
MYSQL_DATABASE: "{{database_databasename}}"
|
|
MYSQL_USER: "{{database_username}}"
|
|
MYSQL_PASSWORD: "{{database_password}}"
|
|
MYSQL_HOST: {{database_host}}:3306
|
|
database:
|
|
logging:
|
|
driver: journald
|
|
image: mariadb:10.5
|
|
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
|
|
environment:
|
|
MYSQL_DATABASE: "{{database_databasename}}"
|
|
MYSQL_USER: "{{database_username}}"
|
|
MYSQL_PASSWORD: "{{database_password}}"
|
|
MYSQL_ROOT_PASSWORD: "{{database_password}}"
|
|
MARIADB_AUTO_UPGRADE: "1"
|
|
volumes:
|
|
- database:/var/lib/mysql
|
|
restart: always
|
|
healthcheck:
|
|
test: "/usr/bin/mariadb --user={{database_username}} --password={{database_password}} --execute \"SHOW DATABASES;\""
|
|
interval: 3s
|
|
timeout: 1s
|
|
retries: 5
|
|
web:
|
|
image: nginx:alpine
|
|
logging:
|
|
driver: journald
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:{{http_port}}:80"
|
|
depends_on:
|
|
- application
|
|
volumes:
|
|
- "{{path_docker_volumes}}nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro"
|
|
volumes_from:
|
|
- application
|
|
|
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
|
|
|
cron:
|
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
|
restart: always
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
- data:/var/www/html
|
|
entrypoint: /cron.sh
|
|
depends_on:
|
|
- database
|
|
- redis
|
|
volumes:
|
|
database:
|
|
data:
|
|
redis:
|
|
networks:
|
|
default:
|
|
driver: bridge
|