pass the feed URL via env var rather than config map so that standalone Docker usage is simplified

This commit is contained in:
James Wilson
2021-08-14 11:32:48 +01:00
parent 502fd2e91a
commit 8793d0fd5b
5 changed files with 12 additions and 25 deletions
+7 -6
View File
@@ -15,18 +15,19 @@ FROM docker.io/nginx:stable-alpine
LABEL maintainer="Chevdor <chevdor@gmail.com>"
LABEL description="Polkadot Telemetry frontend"
# When we run the built docker image, the default command uses this
# env var to tell the UI where to look to get feed info.
ENV SUBSTRATE_TELEMETRY_URL=
WORKDIR /usr/share/nginx/html
#COPY --from=builder /opt/builder/env.sh /usr/bin/
#RUN apk add --no-cache bash; chmod +x /usr/bin/env.sh
COPY --from=builder /opt/builder/env.sh /usr/bin/
RUN apk add --no-cache bash; chmod +x /usr/bin/env.sh
#COPY --from=builder /opt/builder/nginx/nginx.conf /etc/nginx/nginx.conf
#COPY --from=builder /opt/builder/nginx/default /etc/nginx/sites-available/default
COPY --from=builder /opt/builder/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /opt/builder/nginx/default /etc/nginx/sites-available/default
COPY --from=builder /opt/builder/build /usr/share/nginx/html
EXPOSE 80
#CMD ["/bin/bash", "-c", "/usr/bin/env.sh && nginx -g \"daemon off;\""]
CMD [ "nginx", "-g" ,"daemon off;"]
CMD ["/bin/bash", "-c", "/usr/bin/env.sh && nginx -g \"daemon off;\""]