forked from MaticBabnik/shitty-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (27 loc) · 636 Bytes
/
Dockerfile
File metadata and controls
44 lines (27 loc) · 636 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
39
40
41
42
43
44
FROM node:16 as build-frontend
RUN apt install git
COPY . /app
WORKDIR /app/frontend
RUN chmod +x setvars.sh
RUN npm i && npm run build
FROM node:16-alpine as base
COPY --from=build-frontend /app/frontend/dist /app/frontend/dist
WORKDIR /app
COPY ./src ./src
COPY ./package.json .
COPY ./tsconfig.json .
RUN npm i
FROM node:16-alpine as run
COPY --from=base /app /app
WORKDIR /app
# default args
ARG PORT=8080
ARG PORT_METRICS=9090
#ARG NO_METRICS="false"
# set env variables
ENV PORT=$PORT
ENV PORT_METRICS=$PORT_METRICS
#ENV NO_METRICS=$NO_METRICS
EXPOSE $PORT
EXPOSE $PORT_METRICS
ENTRYPOINT ["npm", "run", "start"]