forked from ohcnetwork/care_fe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (15 loc) · 588 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
#build-stage
FROM --platform=$BUILDPLATFORM node:20-buster-slim as build-stage
WORKDIR /app
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ]; then apt-get update && apt-get install -y python3-dev make g++; fi
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
#production-stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/build /usr/share/nginx/html
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]