-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
24 lines (18 loc) · 671 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
FROM node:20 as build
WORKDIR /src
COPY package.json package-lock.json /src/
RUN npm install
ENV GOOGLE_APPLICATION_CREDENTIALS=/src/credentials.json
ENV FIREBASE_PROJECT_ID=analysis-tools-dev
ARG GH_TOKEN
ARG PROJECT_ID
COPY . /src
# Download tools.json directly in Dockerfile and detect changes
# This is done to ensure that we redeploy the app whenever the tools.json changes
ADD https://raw.githubusercontent.com/analysis-tools-dev/static-analysis/master/data/api/tools.json /src/data/api/tools.json
RUN npm run build
RUN rm /src/credentials.json /src/data/api/tools.json
FROM node:20
WORKDIR /src
COPY --from=build /src /src
ENTRYPOINT ["npm", "run", "start"]