Skip to content

Commit

Permalink
notify_push (HPB) for nextcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
SaswatPadhi committed Nov 19, 2023
1 parent 2c65158 commit 64ce8b0
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
10 changes: 10 additions & 0 deletions nextcloud/docker-compose.labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
nextcloud:
labels:
traefik.enable: true
traefik.http.routers.push.priority: 1
traefik.http.middlewares.strip-nextcloud-prefix.stripPrefix.prefixes: "/nextcloud"
traefik.http.middlewares.nextcloud-caldav-redirect.redirectRegex.permanent: true
traefik.http.middlewares.nextcloud-caldav-redirect.redirectRegex.regex: "^https://(.+)/nextcloud/.well-known/(card|cal)dav"
Expand All @@ -12,3 +13,12 @@ services:
traefik.http.routers.nextcloud.entryPoints: wan-https
# NOTE: Order of middlewares matters: redirect must be performed before stripping
traefik.http.routers.nextcloud.middlewares: nextcloud-caldav-redirect@docker,strip-nextcloud-prefix
push:
labels:
traefik.enable: true
traefik.http.routers.push.priority: 2
traefik.http.services.push.loadBalancer.server.port: 7867
traefik.http.middlewares.strip-push-prefix.stripPrefix.prefixes: "/push"
traefik.http.routers.push.rule: PathPrefix(`/nextcloud/push`)
traefik.http.routers.push.entryPoints: wan-https
traefik.http.routers.push.middlewares: strip-push-prefix
38 changes: 37 additions & 1 deletion nextcloud/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,50 @@ services:
- env/nextcloud
environment:
TZ: ${TZ:?}
NEXTCLOUD_TRUSTED_DOMAINS: ${SERVER_WAN_FQDN:?} ${SERVER_LAN_FQDN:?} nextcloud

healthcheck:
test: "curl -fso /dev/null http://localhost:80"
interval: 15s
timeout: 3s
start_period: 15s

push:
hostname: push
image: padhihomelab/nextcloud:27.1.3_19.24.2_1.1.0
restart: unless-stopped

security_opt:
- no-new-privileges:true
user: ${USER_ID:?}

entrypoint: |-
/var/www/html/custom_apps/notify_push/bin/x86_64/notify_push /var/www/html/config/config.php
depends_on:
- nextcloud

networks:
- default
- proxy
volumes_from:
- nextcloud:rw

env_file:
- env/mariadb
- env/redis
- env/nextcloud
environment:
TZ: ${TZ:?}
PORT: 7867
NEXTCLOUD_URL: http://nextcloud/

healthcheck:
test: "pgrep notify_push"
interval: 15s
timeout: 3s
start_period: 5s

cron:
hostname: cron
image: padhihomelab/nextcloud:27.1.3_19.24.2_1.1.0
Expand All @@ -118,7 +155,6 @@ services:
#NOTE: `crond` needs to run as `root` user.

depends_on:
- redis
- nextcloud

networks:
Expand Down
1 change: 1 addition & 0 deletions nextcloud/env/nextcloud
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ OVERWRITEWEBROOT: '/nextcloud'
# FIXME: See https://github.com/nextcloud/docker/issues/1494
#APACHE_DISABLE_REWRITE_IP: 1
NEXTCLOUD_DATA_DIR: '/data'
TRUSTED_PROXIES: 172.33.0.0/16 172.22.0.0/16

0 comments on commit 64ce8b0

Please sign in to comment.