c54a77a9eb
Bumps node from 14.7.0-alpine to 14.8.0-alpine. Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
31 lines
512 B
Docker
31 lines
512 B
Docker
# Stage 1 testing
|
|
FROM node:14.8.0-alpine as builder
|
|
|
|
COPY . /data
|
|
|
|
# build
|
|
RUN cd /data &&\
|
|
npm ci &&\
|
|
npm test &&\
|
|
npm run jshint_backend &&\
|
|
npm run jshint_frontend &&\
|
|
npm run bundle
|
|
|
|
# Stage 2 package
|
|
FROM node:14.8.0-alpine
|
|
|
|
COPY . /data
|
|
RUN apk update && apk add curl
|
|
|
|
RUN cd /data && npm ci --only=production
|
|
COPY --from=builder /data/public /data/public
|
|
|
|
WORKDIR /data
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=5s --timeout=3s \
|
|
CMD curl -f http://localhost:8080/ || exit 1
|
|
|
|
CMD ["npm", "start"]
|