mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 20:51:07 +01:00
80 lines
1.9 KiB
Django/Jinja
80 lines
1.9 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
|
|
redis:
|
|
image: redis:alpine
|
|
restart: always
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
- redis:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 1s
|
|
timeout: 3s
|
|
retries: 30
|
|
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
|