refactor: allow env variables to configure api urls

This commit is contained in:
Bnyro 2024-06-16 12:19:48 +02:00
parent ecd6165ec2
commit a6290e3c75
2 changed files with 17 additions and 0 deletions

15
docker/entrypoint.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
if [ -z "$PIPED_API" ]; then
echo "PIPED_API not set"
exit 1
fi
if [ -z "$HYP_API" ]; then
echo "HYP_API not set"
exit 1
fi
find /usr/share/nginx/html -type f -exec sed -i s/pipedapi.kavin.rocks/$PIPED_API/g {} \; -exec sed -i s/hyperpipeapi.onrender.com/$HYP_API/g {} \;
nginx -g "daemon off;"