forked from graphile/worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (20 loc) · 737 Bytes
/
Dockerfile
File metadata and controls
31 lines (20 loc) · 737 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
FROM node:18-alpine as builder
WORKDIR /worker/
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile --production=false --no-progress
COPY tsconfig.json .eslintrc.js .eslintignore .prettierrc.js ./
COPY ./sql ./sql
COPY ./src ./src
COPY ./scripts ./scripts
RUN yarn run prepack
FROM node:18-alpine as clean
COPY package.json yarn.lock /worker/
COPY *.md /worker/
COPY --from=builder /worker/dist/ /worker/dist/
COPY --from=builder /worker/sql/ /worker/sql/
FROM node:18-alpine
LABEL description="High performance Node.js/PostgreSQL job queue "
WORKDIR /worker/
ENTRYPOINT ["./dist/cli.js"]
COPY --from=clean /worker/ /worker/
RUN yarn install --frozen-lockfile --production=true --no-progress && yarn cache clean