-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (36 loc) · 1.12 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
41
42
FROM node:16 AS frontend
WORKDIR /tmp/frontendbuild
ENV FRONTEND_COMMIT 85bb6016ec76fdea0efa645a72d8ee418a829211
RUN git clone https://github.com/protoxvga/ada_ui && \
cd ada_ui && \
git reset --hard ${FRONTEND_COMMIT} && \
npm install && \
npx next build && \
npx next export && \
cp -r out /tmp/out && \
cd .. && \
rm -rf adaui
FROM node:16 AS pldgenerator
WORKDIR /tmp/pldgeneratorbuild
COPY ./pldGenerator/package*.json ./
RUN npm install --omit=dev && \
npm cache clean --force
COPY ./pldGenerator ./
FROM node:16 AS app
WORKDIR /tmp/app
COPY ./package*.json ./
RUN npm install && \
npm cache clean --force
COPY ./ ./
RUN npm run buildMail && \
npm run build
COPY ./ ./
FROM node:16
VOLUME [ "/usr/src/app/pldGenerator/custom/customGenerator", "/usr/src/app/pldGenerator/generated", "/usr/src/app/pldGenerator/assets" ]
WORKDIR /usr/src/app
COPY --from=app /tmp/app/ /usr/src/app/
COPY --from=frontend /tmp/out /usr/src/app/public2
COPY --from=pldgenerator /tmp/pldgeneratorbuild /usr/src/app/pldGenerator
EXPOSE 4000
ENTRYPOINT [ "/usr/src/app/dockerEntrypoint.sh" ]
CMD ["npm", "start"]