Add YACD_DEFAULT_BACKEND env var for Docker image (#663)
This commit is contained in:
parent
05691cc829
commit
95afc454d5
2 changed files with 6 additions and 1 deletions
|
@ -12,4 +12,6 @@ RUN yarn config set network-timeout 300000 \
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
RUN rm -rf /usr/share/nginx/html/*
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
COPY --from=builder /app/public /usr/share/nginx/html
|
COPY --from=builder /app/public /usr/share/nginx/html
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
ENV YACD_DEFAULT_BACKEND "http://127.0.0.1:9090"
|
||||||
|
ADD docker-entrypoint.sh /
|
||||||
|
CMD ["/docker-entrypoint.sh"]
|
||||||
|
|
3
docker-entrypoint.sh
Executable file
3
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
sed -i "s|http://127.0.0.1:9090|$YACD_DEFAULT_BACKEND|" /usr/share/nginx/html/index.html
|
||||||
|
nginx -g "daemon off;"
|
Loading…
Reference in a new issue