-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (16 loc) · 602 Bytes
/
Dockerfile
File metadata and controls
30 lines (16 loc) · 602 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
FROM node:18-alpine
ENV NODE_ENV=production
RUN mkdir -p /home/node/app/node_modules
RUN chown -R node:node /home/node/app
WORKDIR /home/node/app
COPY package*.json ./
USER node
# the rest of the actual env will have to be passed during the run phase
RUN npm ci --only=production
RUN npm run FIX_ERR_REQUIRE_ESM_BULLMQ
COPY --chown=node:node . .
EXPOSE 5000
RUN apk --no-cache add dumb-init
# running it like this will not allow the workers to also run
# but if the we run it via npm ctrl+c and such signals may not pass through to node process
CMD ["dumb-init", "node", "./bin/www.js"]