98 lines
2.5 KiB
Django/Jinja
98 lines
2.5 KiB
Django/Jinja
{% from "contrib/compose_helpers.j2" import traefik_labels with context %}
|
|
{##}
|
|
version: "3.7"
|
|
|
|
networks:
|
|
default:
|
|
traefik_traefik:
|
|
external: true
|
|
|
|
|
|
services:
|
|
app:
|
|
image: nextcloud:${NEXTCLOUD_VERSION}
|
|
container_name: nextcloud_app
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
env_file:
|
|
- .env.nextcloud
|
|
networks:
|
|
- default
|
|
volumes:
|
|
- {{ base_volume_path }}/nextcloud/nextcloud:/var/www/html
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_config:/var/www/html/config
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_data:/var/www/html/data
|
|
|
|
cron:
|
|
image: nextcloud:${NEXTCLOUD_VERSION}
|
|
container_name: nextcloud_cron
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- app
|
|
entrypoint: /cron.sh
|
|
networks:
|
|
- default
|
|
volumes:
|
|
- {{ base_volume_path }}/nextcloud/nextcloud:/var/www/html
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_config:/var/www/html/config
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_data:/var/www/html/data
|
|
|
|
notify_push:
|
|
image: nextcloud:${NEXTCLOUD_VERSION}
|
|
container_name: nextcloud_notify_push
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- app
|
|
entrypoint:
|
|
- /var/www/html/custom_apps/notify_push/bin/x86_64/notify_push
|
|
- /var/www/html/config/config.php
|
|
networks:
|
|
- default
|
|
volumes:
|
|
- {{ base_volume_path }}/nextcloud/nextcloud:/var/www/html
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_config:/var/www/html/config
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_data:/var/www/html/data
|
|
|
|
db:
|
|
image: postgres:13-alpine
|
|
container_name: nextcloud_db
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.db
|
|
networks:
|
|
- default
|
|
volumes:
|
|
- {{ base_volume_path }}/nextcloud/db:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: nextcloud_redis
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.redis
|
|
networks:
|
|
- default
|
|
command:
|
|
- sh
|
|
- -c
|
|
- redis-server --requirepass $$REDIS_PASSWORD
|
|
|
|
web:
|
|
image: nginx:1.23-alpine
|
|
container_name: nextcloud_web
|
|
labels:
|
|
- {{ traefik_labels("nc") | indent(6) }}
|
|
restart: unless-stopped
|
|
links:
|
|
- app
|
|
networks:
|
|
- traefik_traefik
|
|
- default
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- {{ base_volume_path }}/nextcloud/nextcloud:/var/www/html
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_config:/var/www/html/config
|
|
- {{ base_volume_path }}/nextcloud/nextcloud_data:/var/www/html/data
|