-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 804 Bytes
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 804 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
32
33
34
35
36
37
38
FROM node:20-bullseye as build
ADD . /app
# build frontend
WORKDIR /app/frontend-angular
# set env varaiables for frontend
ENV IS_PRODUCTION=true
ENV PARSE_APP_ID=shift-planner
ENV PARSE_SERVER_URL=/parse
RUN npm install
RUN npm run build-prod-docker
FROM node:20-bullseye as final
WORKDIR /app
# set timezone
RUN apt install tzdata -y
ENV TZ="Europe/Zurich"
ADD ./backend-parse-server /app
COPY --from=build /app/frontend-angular/dist/shift /app/frontend
# needed for puppeteer
RUN apt-get update && apt-get -y install libxss1 libnss3 libasound2 libatk-bridge2.0-0 libgtk-3-0 libgbm-dev
#build backend
RUN npm install
RUN npm run build
RUN rm -rf ./src && rm -rf ./spec
ENV APP_ID=shift-planner
ENV APP_NAME=shift
ENV USE_ENV_VARIABLE=true
ENV PORT=1337
CMD [ "npm", "run", "start-no-build" ]