mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-22 06:48:04 +00:00
779c5698a0
* get tests working and update copyright headers * lint fix * eslint ts update * update CI to use NPM * fix CI * prettier * npm, not yarn for docker * remove unused package * bump dockerfile to latest node LTS and no need for cache clean * make frontend Dockerfile work and remove unused SUBSTRATE_TELEMETRY_SAMPLE * remove final yarn references * add another comment * remove unused import * remove more unused deps * comment typo
41 lines
1.1 KiB
Docker
41 lines
1.1 KiB
Docker
#### BUILDER IMAGE ####
|
|
FROM docker.io/node:18 as builder
|
|
LABEL maintainer="Chevdor <chevdor@gmail.com>"
|
|
LABEL description="Substrate Telemetry Frontend builder image"
|
|
|
|
WORKDIR /opt/builder
|
|
|
|
COPY . .
|
|
|
|
RUN npm install && npm run build
|
|
|
|
#### OUTPUT IMAGE ####
|
|
FROM docker.io/nginx:stable-alpine
|
|
LABEL maintainer="Chevdor <chevdor@gmail.com>"
|
|
LABEL description="Substrate Telemetry Frontend"
|
|
|
|
# Each time this container is ran, the value that's provided for this env var
|
|
# determines where the frontend will try to request feed information from:
|
|
ENV SUBSTRATE_TELEMETRY_URL=
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /opt/builder/scripts/*.sh /usr/local/bin/
|
|
COPY --from=builder /opt/builder/build /app
|
|
COPY --from=builder /opt/builder/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
RUN apk add --no-cache bash && \
|
|
chown -R nginx:nginx /app && \
|
|
chown -R nginx:nginx /var/cache/nginx && \
|
|
chown -R nginx:nginx /var/log/nginx && \
|
|
chown -R nginx:nginx /etc/nginx/conf.d && \
|
|
touch /var/run/nginx.pid && \
|
|
chown -R nginx:nginx /var/run/nginx.pid && \
|
|
rm /etc/nginx/conf.d/default.conf
|
|
|
|
# UID= 101
|
|
USER nginx
|
|
EXPOSE 8000
|
|
|
|
CMD ["/usr/local/bin/start.sh"]
|