-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (20 loc) · 920 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:lts-alpine
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
LABEL maintainer="Ryan Blunden <[email protected]>"
# Use to cache bust system dependencies
ENV LAST_UPDATED 2021-04-16
# Installing bind-tools ensures DNS resolution works everywhere
# See https://github.com/gliderlabs/docker-alpine/issues/539#issuecomment-607159184
RUN apk add --no-cache bind-tools gnupg git tini
# Doppler CLI
RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh
WORKDIR /usr/src/app
ENV PATH=$PATH:/usr/src/app/node_modules/.bin
COPY package.json package-lock.json ./
RUN npm clean-install --only=production --silent --no-audit && mv node_modules ../
COPY . .
USER node
EXPOSE 8080 8443
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD wget http://localhost:8080/healthz -q -O - || exit 1
ENTRYPOINT ["tini", "--"]
CMD ["doppler", "run", "--", "npm", "start"]