mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-27 12:48:01 +02:00
Merge pull request 'refactor: allow env variables to configure api urls' (#170) from bnyro/Hyperpipe:dockerfile-env into main
Reviewed-on: https://codeberg.org/Hyperpipe/Hyperpipe/pulls/170
This commit is contained in:
commit
6f2756181c
2 changed files with 17 additions and 0 deletions
|
@ -13,5 +13,7 @@ FROM --platform=$TARGETPLATFORM nginx:stable-alpine
|
||||||
|
|
||||||
COPY --from=build /app/dist/ /usr/share/nginx/html/
|
COPY --from=build /app/dist/ /usr/share/nginx/html/
|
||||||
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
COPY docker/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||||
|
|
15
docker/entrypoint.sh
Executable file
15
docker/entrypoint.sh
Executable 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;"
|
Loading…
Add table
Add a link
Reference in a new issue