mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-04 12:43:44 +00:00
docker: add entrypoint script + env var for configuring
This commit is contained in:
parent
139f5c8c90
commit
1c74bd1196
@ -4,3 +4,4 @@ dist/
|
|||||||
.*
|
.*
|
||||||
*.md
|
*.md
|
||||||
!.prettier*
|
!.prettier*
|
||||||
|
!.eslintrc.cjs
|
||||||
|
@ -19,5 +19,7 @@ FROM nginx: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" ]
|
||||||
|
@ -2,5 +2,7 @@ FROM nginx:alpine
|
|||||||
|
|
||||||
COPY ./dist-ci/ /usr/share/nginx/html/
|
COPY ./dist-ci/ /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" ]
|
||||||
|
9
docker/entrypoint.sh
Executable file
9
docker/entrypoint.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "$BACKEND_HOSTNAME" ]; then
|
||||||
|
echo "BACKEND_HOSTNAME not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i s/pipedapi.kavin.rocks/"$BACKEND_HOSTNAME"/g /usr/share/nginx/html/assets/*
|
||||||
|
nginx -g "daemon off;"
|
Loading…
Reference in New Issue
Block a user