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

67 lines
1.5 KiB
Django/Jinja

version: '2'
services:
application:
image: "nextcloud:{{nextcloud_version}}-fpm-alpine"
restart: always
logging:
driver: journald
depends_on:
- database
volumes:
- data:/var/www/html
environment:
COMPOSE_HTTP_TIMEOUT: 120
DOCKER_CLIENT_TIMEOUT: 120
MYSQL_DATABASE: "nextcloud"
MYSQL_USER: "nextcloud"
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
MYSQL_HOST: database:3306
database:
logging:
driver: journald
image: mariadb
environment:
COMPOSE_HTTP_TIMEOUT: 120
DOCKER_CLIENT_TIMEOUT: 120
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:
- /usr/local/bin/docker-nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
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