Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{$HOSTNAME} {
route /.well-known/stoat.json {
Comment thread
Pecacheu marked this conversation as resolved.
Outdated
uri strip_prefix /.well-known/stoat.json
header {
Access-Control-Allow-Origin *
}
file_server {
root /data/stoat.json
}
}

route /api* {
uri strip_prefix /api
reverse_proxy http://api:14702 {
Expand Down
8 changes: 8 additions & 0 deletions generate_config.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

set -e
SECRETS_FOUND=0
IS_OVERWRITING=0
DOMAIN=
Expand Down Expand Up @@ -176,15 +177,22 @@ else
echo "Using old Livekit secrets..."
fi

GIFBOX="https://api.gifbox.me"
Comment thread
Pecacheu marked this conversation as resolved.
Outdated

# set hostname for Caddy and vite variables
echo "HOSTNAME=$STOAT_HOSTNAME" > .env.web
echo "REVOLT_PUBLIC_URL=https://$DOMAIN/api" >> .env.web
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=$GIFBOX" >> .env.web
echo "VITE_CFG_ENABLE_VIDEO=$VIDEO_ENABLED" >> .env.web

# client config
mkdir -p data/caddy-data
echo "{\"api\":\"https://$DOMAIN/api\",\"gifbox\":\"$GIFBOX\"}" > data/caddy-data/stoat.json

# hostnames
echo "# All secrets are stored in secrets.env" > Revolt.toml
echo "# Any configuration added to this file will be overwritten by generate_config on run; however," >> Revolt.toml
Expand Down