commit 5545f7c9c9783fb458ad6bbc451a278776a828a3 Author: Timm Date: Thu Jun 25 14:38:55 2020 +0200 add docker-compose complete file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f41f0bd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,77 @@ +version: '3' + +networks: + nginx-proxy: + external: true + + backend-nextcloud: + external: true + +services: + db: + image: mariadb:10.5.3 + command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW + restart: always + volumes: + - /opt/docker/nextcloud/mariadb:/var/lib/mysql + environment: + - MYSQL_RANDOM_ROOT_PASSWORD: '1' + env_file: + - db.env + container_name: nextcloud-db + networks: + - backend-nextcloud + + redis: + image: redis:6.0-alpine + container_name: nextcloud-redis + networks: + - backend-nextcloud + restart: always + + app: + image: nextcloud:18.0.6-fpm-alpine + restart: always + volumes: + - /opt/docker/nextcloud/app:/var/www/html + - /mnt/storage-box/data-nextcloud:/var/www/html/data + environment: + - MYSQL_HOST=db + - REDIS_HOST=redis + env_file: + - db.env + networks: + - backend-nextcloud + depends_on: + - db + - redis + container_name: nextcloud + + web: + image: nginx:1.19-alpine + restart: always + ports: + - 8080:80 + volumes: + - /opt/docker/nextcloud/app:/var/www/html:ro + - ./nginx.conf:/etc/nginx/nginx.conf:ro + depends_on: + - app + networks: + - nginx-proxy + - backend-nextcloud + container_name: nextcloud-nginx + + cron: + image: nextcloud:18.0.6-fpm-alpine + restart: always + volumes: + - /opt/docker/nextcloud/app:/var/www/html + - /mnt/storage-box/data-nextcloud:/var/www/html/data + entrypoint: /cron.sh + depends_on: + - db + - redis + container_name: nextcloud-cron + networks: + - backend-nextcloud