Skip to content

Commit 6c27310

Browse files
authored
Merge pull request #852 from melonarc/nextcloud-notify-push
nextcloud-notify-push: initial commit
2 parents a64a5da + dd2af3a commit 6c27310

File tree

26 files changed

+95
-103
lines changed

26 files changed

+95
-103
lines changed

.github/workflows/BuildImage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on: [push, pull_request_target, workflow_dispatch]
55
env:
66
GITHUB_REPO: "linuxserver/docker-mods" #don't modify
77
ENDPOINT: "linuxserver/mods" #don't modify
8-
BASEIMAGE: "replace_baseimage" #replace
9-
MODNAME: "replace_modname" #replace
10-
MULTI_ARCH: "false" #set to true if needed
8+
BASEIMAGE: "nextcloud"
9+
MODNAME: "notify-push"
10+
MULTI_ARCH: "false"
1111

1212
jobs:
1313
set-vars:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
FROM scratch
44

5-
LABEL maintainer="username"
5+
LABEL maintainer="melonarc"
66

77
# copy local files
88
COPY root/ /

Dockerfile.complex

Lines changed: 0 additions & 33 deletions
This file was deleted.

README.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1-
# Rsync - Docker mod for openssh-server
1+
# nextcloud-notify-push - Docker mod for Nextcloud
22

3-
This mod adds rsync to openssh-server, to be installed/updated during container start.
3+
This mod adds a service to start the [notify-push](https://github.com/nextcloud/notify_push) binary.
44

5-
In openssh-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:openssh-server-rsync`
5+
## Requirements
66

7-
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:openssh-server-rsync|linuxserver/mods:openssh-server-mod2`
7+
- Redis configured in your config.php
88

9-
# Mod creation instructions
9+
## Setup
1010

11-
* Fork the repo, create a new branch based on the branch `template`.
12-
* Edit the `Dockerfile` for the mod. `Dockerfile.complex` is only an example and included for reference; it should be deleted when done.
13-
* Inspect the `root` folder contents. Edit, add and remove as necessary.
14-
* After all init scripts and services are created, run `find ./ -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print -exec chmod +x {} +` to fix permissions.
15-
* Edit this readme with pertinent info, delete these instructions.
16-
* Finally edit the `.github/workflows/BuildImage.yml`. Customize the vars for `BASEIMAGE` and `MODNAME`. Set the versioning logic and `MULTI_ARCH` if needed.
17-
* Ask the team to create a new branch named `<baseimagename>-<modname>`. Baseimage should be the name of the image the mod will be applied to. The new branch will be based on the `template` branch.
18-
* Submit PR against the branch created by the team.
11+
1. Add ``DOCKER_MODS=linuxserver/mods:nextcloud-notify-push`` to your env.
1912

13+
2. Make sure that Redis is already configured with Nextcloud.
2014

21-
## Tips and tricks
15+
3. notify_push should be running and ``**** Starting notify-push ****`` appear in the log. Also check for errors.
2216

23-
* Some images have helpers built in, these images are currently:
24-
* [Openvscode-server](https://github.com/linuxserver/docker-openvscode-server/pull/10/files)
25-
* [Code-server](https://github.com/linuxserver/docker-code-server/pull/95)
17+
### Reverse Proxy
18+
19+
The reverse proxy of the `notify_push` service at subfolder `/push` is handled within the Nextcloud container's Nginx site conf. Make sure you are on the latest version. If not sure, make sure your Nextcloud container is up to date, then you can delete the existing site conf at `/config/nginx/site-confs/default.conf` and restart the container. A new conf with the reverse proxy support will be created.
20+
21+
## Validation
22+
23+
1. Read the section about the [Test client](https://github.com/nextcloud/notify_push#test-client). Create an app password and connect to your server
24+
25+
```sh
26+
test_client https://cloud.example.com username password
27+
```
28+
29+
2. Run ``occ notify_push:metrics``. Step 1 can be skipped if real clients are already connected.
30+
31+
```sh
32+
root@1d0f9bf7fff9:/# occ notify_push:metrics
33+
Active connection count: 2
34+
Active user count: 1
35+
Total connection count: 5
36+
Total database query count: 1
37+
Events received: 13
38+
Messages sent: 3
39+
```

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run

Lines changed: 0 additions & 30 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/type

Lines changed: 0 additions & 1 deletion
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/up

Lines changed: 0 additions & 1 deletion
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/run

Lines changed: 0 additions & 8 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/type

Lines changed: 0 additions & 1 deletion
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/up

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)