Compare commits

..

3 Commits

Author SHA1 Message Date
10ffb41353 Update Dockerfile 2021-03-02 14:19:24 +00:00
5810781fd4 Update Dockerfile 2021-03-02 12:55:26 +00:00
303d218570 Update shields/Makefile, shields/Dockerfile files 2021-03-02 12:33:32 +00:00
2 changed files with 21 additions and 2 deletions

18
shields/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:12-alpine
RUN mkdir -p /usr/src/app/private
WORKDIR /usr/src/app
COPY . /usr/src/app
# We need dev deps to build the front end. We don't need Cypress, though.
RUN NODE_ENV=development CYPRESS_INSTALL_BINARY=0 npm ci && \
npm run build && \
npm prune --production && \
npm cache clean --force
# Run the server using production configs.
ENV NODE_ENV production
CMD node server
EXPOSE 80

View File

@ -13,7 +13,8 @@ decompress:
build:
docker buildx build --platform linux/amd64,linux/arm64 --push \
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) shields-$(VERSION)
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) \
--file Dockerfile shields-$(VERSION)