mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-15 12:06:57 +08:00
9432602727
* impr: add selfhosting using docker only * add recaptcha config and docs * add documentation on the backend-configuration.json file, remove ---redacted--- from example config --------- Co-authored-by: Jack <jack@monkeytype.com>
22 lines
509 B
Bash
Executable file
22 lines
509 B
Bash
Executable file
#!/bin/sh
|
|
if [ -f backend-configuration.json ]; then
|
|
echo "waiting for backend..."
|
|
|
|
timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' localhost 5005
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "failed to apply config"
|
|
exit 1
|
|
fi
|
|
|
|
echo "apply server config"
|
|
|
|
wget -qO- --method=PATCH \
|
|
--body-data="`cat backend-configuration.json`" \
|
|
--header='Content-Type:application/json' \
|
|
http://localhost:5005/configuration
|
|
|
|
echo "server config applied"
|
|
else
|
|
echo "skip backend configuration"
|
|
fi
|