forked from bluesky-social/indigo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
relay: code tweaks, README, and helper scripts for self-hosting (blue…
…sky-social#689) - Makefile command to build dashboard - small refactors and simplifications of bigsky env var and CLI arg parsing; should be safe to merge and deploy to prod - disable some Relay features by default when bigsky is run (like "aggregations" and "spidering") The helper bash scripts are a bit duplicate with `gosky` commands, and aren't super important, I can yank those if they seem too redundant.
- Loading branch information
Showing
9 changed files
with
261 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,6 @@ sonar_cursor.json | |
out/ | ||
state.json | ||
netsync-out/ | ||
|
||
# Relay dash output | ||
/public/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # fail on error | ||
set -u # fail if variable not set in substitution | ||
set -o pipefail # fail if part of a '|' command fails | ||
|
||
if test -z "${RELAY_ADMIN_KEY}"; then | ||
echo "RELAY_ADMIN_KEY secret is not defined" | ||
exit -1 | ||
fi | ||
|
||
if test -z "${RELAY_HOST}"; then | ||
echo "RELAY_HOST config not defined" | ||
exit -1 | ||
fi | ||
|
||
if test -z "$1"; then | ||
echo "expected PDS hostname as an argument" | ||
exit -1 | ||
fi | ||
|
||
echo "requestCrawl $1" | ||
http --quiet --ignore-stdin post https://${RELAY_HOST}/admin/pds/requestCrawl Authorization:"Bearer ${RELAY_ADMIN_KEY}" \ | ||
hostname=$1 | ||
|
||
echo "changeLimits $1" | ||
http --quiet --ignore-stdin post https://${RELAY_HOST}/admin/pds/changeLimits Authorization:"Bearer ${RELAY_ADMIN_KEY}" \ | ||
per_second:=100 \ | ||
per_hour:=1000000 \ | ||
per_day:=1000000 \ | ||
crawl_rate:=10 \ | ||
repo_limit:=1000000 \ | ||
host=$1 |
Oops, something went wrong.