computer-playbook/roles/docker-nextcloud/templates/docker-compose.yml.j2

63 lines
1.3 KiB
Plaintext
Raw Normal View History

version: '3'
2021-10-08 22:08:48 +02:00
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
environment:
MYSQL_DATABASE: "nextcloud"
MYSQL_USER: "nextcloud"
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
volumes:
- database:/var/lib/mysql
restart: always
web:
image: nginx:alpine
logging:
driver: journald
restart: always
ports:
- "127.0.0.1:{{http_port}}:80"
depends_on:
- application
volumes:
2021-10-18 18:46:58 +02:00
- /home/administrator/volumes/docker/nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
2021-10-08 22:08:48 +02:00
volumes_from:
- application
redis:
image: redis:alpine
restart: always
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:
networks:
default:
driver: bridge