-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (22 loc) · 803 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
31
32
33
34
35
36
37
38
FROM node:20 as frontend-builder
WORKDIR /home/app
RUN yarn config set network-timeout 300000
COPY ./frontend/package.json ./frontend/yarn.lock /home/app/frontend/
WORKDIR /home/app/frontend
RUN NODE_ENV=production yarn install
COPY ./frontend /home/app/frontend/
RUN yarn build
FROM node:20
WORKDIR /home/app
RUN yarn config set network-timeout 300000
RUN yarn global add concurrently
COPY ./backend/package.json ./backend/yarn.lock /home/app/backend/
WORKDIR /home/app/backend
RUN NODE_ENV=production yarn install
WORKDIR /home/app/backend
COPY ./backend /home/app/backend/
RUN NODE_ENV=production yarn build
COPY --from=frontend-builder /home/app/frontend/.output /home/app/frontend/.output
COPY ./entrypoint.sh /home/app/entrypoint.sh
WORKDIR /app
ENTRYPOINT /home/app/entrypoint.sh