mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-24 11:15:02 +01:00
79 lines
1.8 KiB
Django/Jinja
79 lines
1.8 KiB
Django/Jinja
version: '3'
|
|
|
|
services:
|
|
application:
|
|
image: "nextcloud:{{nextcloud_version}}-fpm-alpine"
|
|
restart: always
|
|
logging:
|
|
driver: journald
|
|
depends_on:
|
|
- database
|
|
volumes:
|
|
- data:/var/www/html
|
|
environment:
|
|
MYSQL_DATABASE: "nextcloud"
|
|
MYSQL_USER: "nextcloud"
|
|
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
|
|
MYSQL_HOST: database:3306
|
|
database:
|
|
logging:
|
|
driver: journald
|
|
image: mariadb:10.5
|
|
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
|
|
environment:
|
|
MYSQL_DATABASE: "nextcloud"
|
|
MYSQL_USER: "nextcloud"
|
|
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
|
|
MYSQL_ROOT_PASSWORD: "{{nextcloud_database_password}}"
|
|
volumes:
|
|
- database:/var/lib/mysql
|
|
restart: always
|
|
healthcheck:
|
|
test: "/usr/bin/mysql --user=nextcloud --password={{nextcloud_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:
|
|
- /home/administrator/volumes/docker/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:{{nextcloud_version}}-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
|