-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (28 loc) · 831 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
#-------------------------------------------
# Build
#-------------------------------------------
FROM node:16-alpine AS build
WORKDIR /build/map-client
COPY map-client/package*.json ./
RUN npm install
WORKDIR /build/map-server
COPY map-server/package*.json ./
RUN npm install
WORKDIR /build/map-client
COPY map-client .
WORKDIR /build/map-server
COPY map-server .
RUN npm run build
#-------------------------------------------
# Deploy
#-------------------------------------------
FROM node:16-alpine
WORKDIR /app
COPY --from=build /build/map-server/package*.json .
RUN npm ci --only=production
COPY --from=build /build/map-server/build build/
COPY --from=build /build/map-server/frontend frontend
COPY --from=build /build/map-server/data data
COPY --from=build /build/map-server/.env .
EXPOSE 3001
CMD [ "npm", "start" ]