nextcloud-mariadb-redis-phpfpm/docker-compose.yml

75 lines
1.3 KiB
YAML
Raw Normal View History

version: '3'
2019-09-13 19:48:21 +00:00
networks:
webproxy:
external: true
backend-nextcloud:
2019-09-13 21:02:12 +00:00
external: true
2019-09-13 19:48:21 +00:00
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
2019-09-13 19:48:21 +00:00
environment:
- MYSQL_ROOT_PASSWORD=nextcloud
env_file:
- db.env
container_name: nextcloud-db
2019-09-13 19:48:21 +00:00
redis:
image: redis:alpine
container_name: nextcloud-redis
networks:
- backend-nextcloud
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
networks:
- backend-nextcloud
depends_on:
- db
- redis
container_name: nextcloud
2019-09-13 21:24:00 +00:00
web:
build: ./web
restart: always
2019-09-13 21:24:00 +00:00
ports:
- 8080:80
volumes:
- nextcloud:/var/www/html:ro
depends_on:
2019-09-13 21:24:00 +00:00
- app
networks:
- webproxy
- backend-nextcloud
container_name: nextcloud-nginx
cron:
image: nextcloud:fpm-alpine
restart: always
2019-09-13 21:24:00 +00:00
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
2019-09-13 21:24:00 +00:00
depends_on:
- db
- redis
container_name: nextcloud-cron
volumes:
db: /opt/appdata/nextcloud/mysql
nextcloud: /opt/appdata/nextcloud