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 command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1" environment: MYSQL_DATABASE: "nextcloud" MYSQL_USER: "nextcloud" MYSQL_PASSWORD: "{{nextcloud_database_password}}" MYSQL_RANDOM_ROOT_PASSWORD: 'yes' 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 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