feat: Add gifbox integration

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
pull/287/head
Jacob Schlecht 3 months ago
parent d59a061718
commit 5453f1fc61

@ -20,6 +20,7 @@ Below are guides provided by the core team and by the community. Contributions t
- [Placing Stoat Behind Other Reverse Proxies](#placing-stoat-behind-other-reverse-proxies)
- [NGINX](#nginx)
- [Making Your Instance Invite-only](#making-your-instance-invite-only)
- [Enabling the Gif Picker](#enabling-the-gif-picker)
## Placing Stoat Behind Other Reverse Proxies
@ -148,4 +149,17 @@ docker compose exec database mongosh
# create the invite
use revolt
db.invites.insertOne({ _id: "enter_an_invite_code_here" })
```
```
## Enabling the Gif Picker
To enable the gif picker, you must create a Gifbox account and create an api key. Go to [gifbox.me](https://gifbox.me) and make an account. After creating an account and logging in, go to your account settings page by clicking your email in the top right. On your settings page, create an api key. Copy the api key and put it on the bottom of your secrets.env file like so:
```bash
REVOLT__API__SECURITY__TENOR_KEY='<yourapikey>'
```
Restart the stoat-gifbox service by running `docker compose down gifbox && docker compose up -d gifbox`.
The gifpicker should now work.

@ -50,11 +50,11 @@ if test -f "Revolt.toml"; then
fi
echo "Overwriting existing config."
echo "Renaming Revolt.toml to Revolt.toml.old"
mv Revolt.toml Revolt.toml.old
mv Revolt.toml Revolt.toml.old || true
echo "Renaming livekit.yml to livekit.yml.old"
mv livekit.yml livekit.yml.old
mv livekit.yml livekit.yml.old || true
echo "Renaming compose.override.yml to compose.override.yml.old"
mv compose.override.yml compose.override.yml.old
mv compose.override.yml compose.override.yml.old || true
else
echo "Existing config found, in caution, this script will refuse to execute if you have existing config."
if [ "$SECRETS_FOUND" -eq "0" ]; then
@ -184,6 +184,7 @@ echo "VITE_API_URL=https://$DOMAIN/api" >> .env.web
echo "VITE_WS_URL=wss://$DOMAIN/ws" >> .env.web
echo "VITE_MEDIA_URL=https://$DOMAIN/autumn" >> .env.web
echo "VITE_PROXY_URL=https://$DOMAIN/january" >> .env.web
echo "VITE_GIFBOX_URL=https://$DOMAIN/gifbox" >> .env.web
echo "VITE_CFG_ENABLE_VIDEO=$VIDEO_ENABLED" >> .env.web
# client config
@ -200,6 +201,7 @@ echo "api = \"https://$DOMAIN/api\"" >> Revolt.toml
echo "events = \"wss://$DOMAIN/ws\"" >> Revolt.toml
echo "autumn = \"https://$DOMAIN/autumn\"" >> Revolt.toml
echo "january = \"https://$DOMAIN/january\"" >> Revolt.toml
echo "gifbox = \"https://$DOMAIN/gifbox\"" >> Revolt.toml
# livekit hostname
echo "" >> Revolt.toml
@ -247,6 +249,8 @@ if [[ -n "$VIDEO_ENABLED" ]]; then
echo "video_aspect_ratio = [0.3, 10]" >> Revolt.toml
fi
echo "If you would like to enable the gif picker, please see the Guides section of the Readme"
if [[ $IS_OVERWRITING -eq 1 ]]; then
echo "Overwrote existing config. If any custom configuration was present in old Revolt.toml, you may now copy it over from Revolt.toml.old."
fi
Loading…
Cancel
Save