feat: pushd and version 0.8

pull/115/head
IAmTomahawkx 5 months ago
parent 71e9b9579b
commit 6d3d89747d

@ -132,6 +132,7 @@ You can find [more options here](https://github.com/revoltchat/backend/blob/df07
- Email verification - Email verification
- Captcha - Captcha
- A custom S3 server - A custom S3 server
- iOS & Android notifications (Requires Apple/Google developer accounts)
If you'd like to edit the configuration, just run: If you'd like to edit the configuration, just run:
@ -360,3 +361,23 @@ db.invites.insertOne({ _id: "enter_an_invite_code_here" })
> npm i mongodb > npm i mongodb
> node ./20240929-autumn-rewrite.mjs > node ./20240929-autumn-rewrite.mjs
> ``` > ```
> [!IMPORTANT]
> As of day November 2024, the following breaking changes have been applied:
> - Rename config section `api.vapid` -> `pushd.vapid`
> - Rename config section `api.fcm` -> `pushd.fcm`
> - Rename config section `api.apn` -> `pushd.apn`
> - The following fields are needed when using the provided docker compose:
> ```toml
> [rabbit]
> host = "rabbit"
> username = "rabbituser"
> password = "rabbitpass"
> ```
>
> These will NOT automatically be applied to your config, and must be changed/added manually.
>
>
> The following components have been added to the compose file:
> - Added `rabbit` (RabbitMQ) and `pushd` (Revolt push daemon)
>

@ -7,12 +7,33 @@ services:
restart: always restart: always
volumes: volumes:
- ./data/db:/data/db - ./data/db:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
# Redis server # Redis server
redis: redis:
image: eqalpha/keydb image: eqalpha/keydb
restart: always restart: always
rabbit:
image: rabbitmq:4
restart: always
environment:
RABBITMQ_DEFAULT_USER: rabbituser
RABBITMQ_DEFAULT_PASS: rabbitpass
volumes:
- ./data/rabbit:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
# S3-compatible storage server # S3-compatible storage server
minio: minio:
image: minio/minio image: minio/minio
@ -51,17 +72,21 @@ services:
# API server (delta) # API server (delta)
api: api:
image: ghcr.io/revoltchat/server:20241024-1 image: ghcr.io/revoltchat/server:20241128-2
depends_on: depends_on:
- database database:
- redis condition: service_healthy
redis:
condition: service_started
rabbit:
condition: service_healthy
volumes: volumes:
- ./Revolt.toml:/Revolt.toml - ./Revolt.toml:/Revolt.toml
restart: always restart: always
# Events service (quark) # Events service (quark)
events: events:
image: ghcr.io/revoltchat/bonfire:20241024-1 image: ghcr.io/revoltchat/bonfire:20241128-2
depends_on: depends_on:
- database - database
- redis - redis
@ -77,7 +102,7 @@ services:
# File server (autumn) # File server (autumn)
autumn: autumn:
image: ghcr.io/revoltchat/autumn:20241024-1 image: ghcr.io/revoltchat/autumn:20241128-2
depends_on: depends_on:
- database - database
- createbuckets - createbuckets
@ -92,6 +117,20 @@ services:
- ./Revolt.toml:/Revolt.toml - ./Revolt.toml:/Revolt.toml
restart: always restart: always
# Push notification daemon (pushd)
pushd:
image: ghcr.io/revoltchat/pushd:20241128-2
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
rabbit:
condition: service_healthy
volumes:
- ./Revolt.toml:/Revolt.toml
restart: always
# Create buckets for minio. # Create buckets for minio.
createbuckets: createbuckets:
image: minio/mc image: minio/mc

@ -12,11 +12,18 @@ echo "events = \"wss://$1/ws\"" >> Revolt.toml
echo "autumn = \"https://$1/autumn\"" >> Revolt.toml echo "autumn = \"https://$1/autumn\"" >> Revolt.toml
echo "january = \"https://$1/january\"" >> Revolt.toml echo "january = \"https://$1/january\"" >> Revolt.toml
# Rabbit target, since rabbit isn't set up for docker by default
echo "" >> Revolt.toml
echo "[rabbit]" >> Revolt.toml
echo "host = \"rabbit\"" >> Revolt.toml
echo "user = \"rabbituser\"" >> Revolt.toml
echo "password = \"rabbitpass\"" >> Revolt.toml
# VAPID keys # VAPID keys
echo "" >> Revolt.toml echo "" >> Revolt.toml
echo "[api.vapid]" >> Revolt.toml echo "[pushd.vapid]" >> Revolt.toml
openssl ecparam -name prime256v1 -genkey -noout -out vapid_private.pem openssl ecparam -name prime256v1 -genkey -noout -out vapid_private.pem
echo "private_key = \"$(base64 vapid_private.pem | tr -d '\n')\"" >> Revolt.toml echo "private_key = \"$(base64 -i vapid_private.pem | tr -d '\n')\"" >> Revolt.toml
echo "public_key = \"$(openssl ec -in vapid_private.pem -outform DER|tail -c 65|base64|tr '/+' '_-'|tr -d '\n')\"" >> Revolt.toml echo "public_key = \"$(openssl ec -in vapid_private.pem -outform DER|tail -c 65|base64|tr '/+' '_-'|tr -d '\n')\"" >> Revolt.toml
rm vapid_private.pem rm vapid_private.pem

Loading…
Cancel
Save