mail/Dockerfile
dependabot-preview[bot] 72179ed380 Bump node from 14.5.0-alpine to 14.6.0-alpine
Bumps node from 14.5.0-alpine to 14.6.0-alpine.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-29 09:38:08 +02:00

31 lines
512 B
Docker

# Stage 1 testing
FROM node:14.6.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.6.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"]