-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (20 loc) · 904 Bytes
/
Dockerfile
File metadata and controls
32 lines (20 loc) · 904 Bytes
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
31
32
FROM node:16.15.0-alpine as build
WORKDIR /debugger-build
RUN apk add --no-cache python3 make gcc g++ libc-dev sqlite-dev
COPY . /debugger-build
ENV CI=true
RUN NPM_VERSION=$(node -p 'require("./package.json").engines.npm'); npm i -g npm@$NPM_VERSION
RUN npm ci --build-from-source --sqlite=/usr/local
# ---- RUNTIME IMAGE ----------------------------------------------------------
FROM node:16.15.0-alpine
WORKDIR /app
LABEL maintainer="ferdium"
# TODO: Shouldn't we set 'NODE_ENV=production' when running in production mode?
ENV HOST=0.0.0.0 PORT=3333 DATA_DIR="/data"
RUN apk add --no-cache sqlite-libs curl su-exec
COPY --from=build /debugger-build /app
RUN npm i -g @adonisjs/cli
HEALTHCHECK --start-period=5s --interval=30s --retries=5 --timeout=3s CMD curl -sSf http://localhost:${PORT}/health
COPY docker/entrypoint.sh /entrypoint.sh
COPY docker/.env /app/.env
CMD ["/entrypoint.sh"]