88 lines
2.5 KiB
Django/Jinja
88 lines
2.5 KiB
Django/Jinja
{% import 'contrib/compose_helpers.j2' as helpers with context %}
|
|
|
|
networks:
|
|
{{ helpers.default_network(198) | indent(2) }}
|
|
traefik_traefik:
|
|
external: true
|
|
|
|
|
|
services:
|
|
app:
|
|
image: nextcloud:${NEXTCLOUD_VERSION}
|
|
container_name: nextcloud_app
|
|
labels:
|
|
- {{ helpers.traefik_labels('nc', port='80') | indent(6) }}
|
|
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
|
|
{# TODO: Refactor this and minio -#}
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.nc-notify.rule=Host(`nc.{{ domain }}`) && PathPrefix(`/push`)
|
|
- traefik.http.routers.nc-notify.entrypoints=websecure
|
|
- traefik.http.routers.nc-notify.tls=true
|
|
- traefik.http.routers.nc-notify.tls.certresolver=letsencrypt
|
|
- traefik.http.routers.nc-notify.tls.domains.0.main={{ domain }}
|
|
- traefik.http.routers.nc-notify.tls.domains.0.sans=*.{{ domain }}
|
|
- traefik.http.services.nc-notify.loadbalancer.server.port=7867
|
|
restart: unless-stopped
|
|
user: www-data
|
|
env_file:
|
|
- .env.notify_push
|
|
network_mode: service:app
|
|
entrypoint:
|
|
- /var/www/html/custom_apps/notify_push/bin/x86_64/notify_push
|
|
volumes:
|
|
- {{ base_volume_path }}/nextcloud/nextcloud:/var/www/html
|
|
|
|
db:
|
|
image: postgres:16-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:alpine
|
|
container_name: nextcloud_redis
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.redis
|
|
networks:
|
|
- default
|
|
command:
|
|
- sh
|
|
- -c
|
|
- redis-server --requirepass $$REDIS_PASSWORD
|