generated from furystack/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (27 loc) · 1.19 KB
/
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
31
32
33
34
35
36
37
38
39
40
FROM node:lts-alpine as base
COPY --chown=node:node /common /home/node/app/common
COPY --chown=node:node /frontend /home/node/app/frontend
COPY --chown=node:node /service /home/node/app/service
COPY --chown=node:node /package.json /home/node/app/package.json
COPY --chown=node:node /.yarn/releases /home/node/app/.yarn/releases
# These dependencies are only needed for Yarn PNP
# COPY --chown=node:node /.yarn/sdks /home/node/app/.yarn/sdks
# COPY --chown=node:node /.yarn/unplugged /home/node/app/.yarn/unplugged
# COPY --chown=node:node /.pnp.cjs /home/node/app/.pnp.cjs
# COPY --chown=node:node /.pnp.loader.mjs /home/node/app/.pnp.loader.mjs
COPY --chown=node:node /yarn.lock /home/node/app/yarn.lock
COPY --chown=node:node /tsconfig.json /home/node/app/tsconfig.json
COPY --chown=node:node /.yarnrc.yml /home/node/app/.yarnrc.yml
WORKDIR /home/node/app
RUN yarn workspaces focus service --production
FROM node:lts-alpine as runner
RUN apk upgrade -U \
&& apk add ffmpeg \
&& rm -rf /var/cache/*
COPY --chown=node:node --from=base /home/node/app /home/node/app
USER node
ENV E2E_TEMP /home/node/tmp
RUN mkdir /home/node/tmp
EXPOSE 9090
WORKDIR /home/node/app
ENTRYPOINT ["yarn", "start:service"]