update notification server deployment: add ENABLE_NOTIFICATION_SERVER

This commit is contained in:
Junxiang Huang 2025-07-03 15:34:56 +08:00
parent 84909ef655
commit e91199914c
17 changed files with 49 additions and 29 deletions

View File

@ -112,7 +112,8 @@ For configurations about Metadata server in `.env`, please refer [here](../exten
## Notification server
- `NOTIFICATION_SERVER_URL`: The [notification server](../extension/notification-server.md) url, leave blank to disable it (default).
- `ENABLE_NOTIFICATION_SERVER`: Enable (`true`) or disable (`false`) notification feature for Seafile. Default is `false`.
- `NOTIFICATION_SERVER_URL`: The [notification server](../extension/notification-server.md) url.
!!! note "In Seafile cluster or standalone-deployment notification server"
In addition to `NOTIFICATION_SERVER_URL`, you also need to specify `INNER_NOTIFICATION_SERVER_URL=$NOTIFICATION_SERVER_URL`, which will be used for the connection between Seafile server and notification server.

View File

@ -26,23 +26,12 @@ Modify `.env`, and insert `notification-server.yml` into `COMPOSE_FILE`:
COMPOSE_FILE='seafile-server.yml,caddy.yml,notification-server.yml'
```
then add or modify `NOTIFICATION_SERVER_URL`:
then add or modify `ENABLE_NOTIFICATION_SERVER` and `NOTIFICATION_SERVER_URL`:
=== "Deploy with Seafile"
```sh
NOTIFICATION_SERVER_URL=$SEAFILE_SERVER_PROTOCOL://$SEAFILE_SERVER_HOSTNAME/notification
```
=== "Standalone deployment"
```sh
NOTIFICATION_SERVER_URL=<your notification server URL>
INNER_NOTIFICATION_SERVER_URL=$NOTIFICATION_SERVER_URL
```
!!! tip "Difference between `NOTIFICATION_SERVER_URL` and `INNER_NOTIFICATION_SERVER_URL`"
- `NOTIFICATION_SERVER_URL`: used to do the connection between client (i.e., user's browser) and notification server
- `INNER_NOTIFICATION_SERVER_URL`: used to do the connection between Seafile server and notification server
```sh
ENABLE_NOTIFICATION_SERVER=true
NOTIFICATION_SERVER_URL=$SEAFILE_SERVER_PROTOCOL://$SEAFILE_SERVER_HOSTNAME/notification
```
Finally, You can run notification server with the following command:
@ -91,24 +80,25 @@ Then modify the `.env` file according to your environment. The following fields
| `SEAFILE_SERVER_HOSTNAME`| Seafile host name |
| `SEAFILE_SERVER_PROTOCOL`| http or https |
You can run notification server with the following command:
Now, you can run notification server with the following command:
```sh
docker compose up -d
```
And you need to add the following configurations under `seafile.conf` and restart Seafile server:
then you need to modify the **`.env` on the host deployed Seafile**:
```conf
[notification]
enabled = true
# the ip of notification server.
host = 192.168.0.83
# the port of notification server
port = 8083
```sh
ENABLE_NOTIFICATION_SERVER=true
NOTIFICATION_SERVER_URL=http://<your notification server host>:8083
INNER_NOTIFICATION_SERVER_URL=$NOTIFICATION_SERVER_URL
```
You need to configure load balancer according to the following forwarding rules:
!!! tip "Difference between `NOTIFICATION_SERVER_URL` and `INNER_NOTIFICATION_SERVER_URL`"
- `NOTIFICATION_SERVER_URL`: used to do the connection between client (i.e., user's browser) and notification server
- `INNER_NOTIFICATION_SERVER_URL`: used to do the connection between Seafile server and notification server
Finally, you need to configure load balancer according to the following forwarding rules:
1. Forward `/notification/ping` requests to notification server via http protocol.
2. Forward websockets requests with URL prefix `/notification` to notification server.

View File

@ -72,6 +72,7 @@ INIT_SEAFILE_ADMIN_PASSWORD=asecret
ENABLE_SEADOC=true
## Notification
ENABLE_NOTIFICATION_SERVER=false
NOTIFICATION_SERVER_URL=
## Seafile AI

View File

@ -72,6 +72,7 @@ services:
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- MEMCACHED_HOST=${MEMCACHED_HOST:-memcached}
- MEMCACHED_PORT=${MEMCACHED_PORT:-11211}
- ENABLE_NOTIFICATION_SERVER=${ENABLE_NOTIFICATION_SERVER:-false}
- INNER_NOTIFICATION_SERVER_URL=${INNER_NOTIFICATION_SERVER_URL:-http://notification-server:8083}
- NOTIFICATION_SERVER_URL=${NOTIFICATION_SERVER_URL:-}
- ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}

View File

@ -48,6 +48,7 @@ S3_USE_HTTPS=true
S3_SSE_C_KEY=
## Notification
ENABLE_NOTIFICATION_SERVER=false
NOTIFICATION_SERVER_URL=
INNER_NOTIFICATION_SERVER_URL=$NOTIFICATION_SERVER_URL

View File

@ -49,6 +49,7 @@ services:
- SITE_ROOT=${SITE_ROOT:-/}
- ENABLE_SEADOC=${ENABLE_SEADOC:-false}
- SEADOC_SERVER_URL=${SEADOC_SERVER_URL:-http://seafile.example.com/sdoc-server}
- ENABLE_NOTIFICATION_SERVER=${ENABLE_NOTIFICATION_SERVER:-false}
- INNER_NOTIFICATION_SERVER_URL=${INNER_NOTIFICATION_SERVER_URL:-}
- NOTIFICATION_SERVER_URL=${NOTIFICATION_SERVER_URL:-}
- ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}

View File

@ -114,6 +114,7 @@ SS_LOG_OUTPUT=true
SS_LOG_LEVEL=info
## Notification
ENABLE_NOTIFICATION_SERVER=false
NOTIFICATION_SERVER_URL=
## Seafile AI

View File

@ -84,6 +84,7 @@ services:
- S3_USE_HTTPS=${S3_USE_HTTPS:-true}
- S3_PATH_STYLE_REQUEST=${S3_PATH_STYLE_REQUEST:-false}
- S3_SSE_C_KEY=${S3_SSE_C_KEY:-}
- ENABLE_NOTIFICATION_SERVER=${ENABLE_NOTIFICATION_SERVER:-false}
- INNER_NOTIFICATION_SERVER_URL=${INNER_NOTIFICATION_SERVER_URL:-http://notification-server:8083}
- NOTIFICATION_SERVER_URL=${NOTIFICATION_SERVER_URL:-}
- ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}

View File

@ -111,6 +111,11 @@ spec:
configMapKeyRef:
name: seafile-env
key: MEMCACHED_PORT
- name: ENABLE_NOTIFICATION_SERVER
valueFrom:
configMapKeyRef:
name: seafile-env
key: ENABLE_NOTIFICATION_SERVER
- name: INNER_NOTIFICATION_SERVER_URL
valueFrom:
configMapKeyRef:

View File

@ -31,6 +31,7 @@ data:
MEMCACHED_PORT: "11211"
# for notification
ENABLE_NOTIFICATION_SERVER: "false"
NOTIFICATION_SERVER_URL: ""
# for seadoc

View File

@ -42,6 +42,7 @@ data:
S3_PATH_STYLE_REQUEST: "false"
# for notification
ENABLE_NOTIFICATION_SERVER: "false"
NOTIFICATION_SERVER_URL: ""
# for seadoc

View File

@ -167,6 +167,11 @@ spec:
configMapKeyRef:
name: seafile-env
key: S3_PATH_STYLE_REQUEST
- name: ENABLE_NOTIFICATION_SERVER
valueFrom:
configMapKeyRef:
name: seafile-env
key: ENABLE_NOTIFICATION_SERVER
- name: INNER_NOTIFICATION_SERVER_URL
valueFrom:
configMapKeyRef:

View File

@ -161,6 +161,11 @@ spec:
configMapKeyRef:
name: seafile-env
key: MEMCACHED_PORT
- name: ENABLE_NOTIFICATION_SERVER
valueFrom:
configMapKeyRef:
name: seafile-env
key: ENABLE_NOTIFICATION_SERVER
- name: INNER_NOTIFICATION_SERVER_URL
valueFrom:
configMapKeyRef:

View File

@ -43,6 +43,7 @@ data:
S3_PATH_STYLE_REQUEST: "false"
# for notification
ENABLE_NOTIFICATION_SERVER: "false"
NOTIFICATION_SERVER_URL: ""
# for seadoc

View File

@ -57,7 +57,8 @@ The following fields merit particular attention:
| `MEMCACHED_HOST` | Memcached server host | `memcached` |
| `MEMCACHED_PORT` | Memcached server port | `11211` |
| `TIME_ZONE` | Time zone | `UTC` |
| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url, leave blank to disable it | (none) |
| `ENABLE_NOTIFICATION_SERVER` | Enable (`true`) or disable (`false`) notification feature for Seafile | `false` |
| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) |
| `INIT_SEAFILE_ADMIN_EMAIL` | Admin username | `me@example.com` (Recommend modifications) |
| `INIT_SEAFILE_ADMIN_PASSWORD` | Admin password | `asecret` (Recommend modifications) |
| `NON_ROOT` | Run Seafile container without a root user | `false` |

View File

@ -87,7 +87,8 @@ The following fields merit particular attention:
| `S3_USE_V4_SIGNATURE` | Use the v4 protocol of S3 if enabled | `true` |
| `S3_PATH_STYLE_REQUEST` | This option asks Seafile to use URLs like `https://192.168.1.123:8080/bucketname/object` to access objects. In *Amazon S3*, the default URL format is in virtual host style, such as `https://bucketname.s3.amazonaws.com/object`. But this style relies on advanced DNS server setup. So most self-hosted storage systems only implement the path style format. | `false` |
| `S3_SSE_C_KEY` | A string of 32 characters can be generated by openssl rand -base64 24. It can be any 32-character long random string. It's required to use V4 authentication protocol and https if you enable SSE-C. | (none) |
| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url, leave blank to disable it | (none) |
| `ENABLE_NOTIFICATION_SERVER` | Enable (`true`) or disable (`false`) notification feature for Seafile | `false` |
| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) |
| `NON_ROOT` | Run Seafile container without a root user | `false` |
!!! success "Easier to configure S3 for Seafile and its components"

View File

@ -119,11 +119,14 @@ If you are using notification server in Seafile 12, please specify the notificat
=== "Deploy in the same host with Seafile"
```sh
ENABLE_NOTIFICATION_SERVER=true
NOTIFICATION_SERVER_URL=$SEAFILE_SERVER_PROTOCOL://$SEAFILE_SERVER_HOSTNAME/notification
```
=== "Standalone deployment"
```sh
ENABLE_NOTIFICATION_SERVER=true
NOTIFICATION_SERVER_URL=http://<your notification server host>:8083
INNER_NOTIFICATION_SERVER_URL=$NOTIFICATION_SERVER_URL
```
#### Step 3.4) Add configurations for storage backend (Pro)