2021-07-29 04:43:47 +09:00
|
|
|
## Builder
|
2024-04-24 23:31:01 +09:00
|
|
|
FROM node:20.12.2-alpine3.18 as builder
|
2021-07-29 04:43:47 +09:00
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
2022-09-04 01:06:47 +09:00
|
|
|
COPY .npmrc package.json package-lock.json /src/
|
2022-01-31 00:28:38 +09:00
|
|
|
RUN npm ci
|
2022-03-10 21:53:54 +09:00
|
|
|
COPY . /src/
|
2023-03-29 19:57:05 +09:00
|
|
|
ENV NODE_OPTIONS=--max_old_space_size=4096
|
2022-01-31 00:28:38 +09:00
|
|
|
RUN npm run build
|
2021-07-29 04:43:47 +09:00
|
|
|
|
|
|
|
|
|
|
|
## App
|
2024-06-04 13:25:07 +09:00
|
|
|
FROM nginx:1.27.0-alpine
|
2021-07-29 04:43:47 +09:00
|
|
|
|
|
|
|
COPY --from=builder /src/dist /app
|
|
|
|
|
|
|
|
RUN rm -rf /usr/share/nginx/html \
|
|
|
|
&& ln -s /app /usr/share/nginx/html
|