storagenode/dashboard: Enable storagenode dashboard in docker images (#3024)

This commit is contained in:
Matt Robinson 2019-09-16 09:09:59 -04:00 committed by littleskunk
parent d3ef574b20
commit 0c2ae7786e
3 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,6 @@
ARG DOCKER_ARCH
# Satellite UI static asset generation
FROM node:10.15.1 as satellite-ui
FROM node:10.15.1 as ui
WORKDIR /app
COPY web/satellite/ /app
COPY web/marketing/ /app/marketing
@ -10,7 +11,6 @@ RUN npm run build
FROM alpine as ca-cert
RUN apk -U add ca-certificates
ARG DOCKER_ARCH
FROM ${DOCKER_ARCH:-amd64}/alpine
ARG TAG
ARG GOARCH
@ -22,9 +22,9 @@ ENV API_KEY= \
EXPOSE 7777
EXPOSE 10100
WORKDIR /app
COPY --from=satellite-ui /app/static /app/static
COPY --from=satellite-ui /app/dist /app/dist
COPY --from=satellite-ui /app/marketing /app/marketing
COPY --from=ui /app/static /app/static
COPY --from=ui /app/dist /app/dist
COPY --from=ui /app/marketing /app/marketing
COPY --from=ca-cert /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY release/${TAG}/satellite_linux_${GOARCH:-amd64} /app/satellite
COPY cmd/satellite/entrypoint /entrypoint

View File

@ -1,4 +1,11 @@
ARG DOCKER_ARCH
# Storagenode UI static asset generation
FROM node:10.15.1 as ui
WORKDIR /app
COPY web/storagenode/ /app
# Need to clean up (or ignore) local folders like node_modules, etc...
RUN npm install
RUN npm run build
FROM ${DOCKER_ARCH:-amd64}/alpine
ARG TAG
ARG GOARCH
@ -6,6 +13,8 @@ ENV GOARCH ${GOARCH}
EXPOSE 28967
WORKDIR /app
VOLUME /root/.local/share/storj/storagenode
COPY --from=ui /app/static /app/static
COPY --from=ui /app/dist /app/dist
COPY resources/certs.pem /etc/ssl/certs/ca-certificates.crt
COPY release/${TAG}/storagenode_linux_${GOARCH:-amd64} /app/storagenode
COPY cmd/storagenode/entrypoint /entrypoint

View File

@ -14,6 +14,7 @@ RUN_PARAMS="${RUN_PARAMS:-} --kademlia.external-address=${ADDRESS}"
RUN_PARAMS="${RUN_PARAMS:-} --kademlia.operator.email=${EMAIL}"
RUN_PARAMS="${RUN_PARAMS:-} --kademlia.operator.wallet=${WALLET}"
RUN_PARAMS="${RUN_PARAMS:-} --console.address=:14002"
RUN_PARAMS="${RUN_PARAMS:-} --console.static-dir=/app"
RUN_PARAMS="${RUN_PARAMS:-} --storage.allocated-bandwidth=${BANDWIDTH}"
RUN_PARAMS="${RUN_PARAMS:-} --storage.allocated-disk-space=${STORAGE}"