mirror of
https://github.com/codex-storage/codex-frontend.git
synced 2025-03-01 02:30:49 +00:00
16 lines
523 B
Docker
16 lines
523 B
Docker
# Build step #1: build the React front end
|
|
FROM node:18 as build-step
|
|
WORKDIR /frontend
|
|
ENV PATH /frontend/node_modules/.bin:$PATH
|
|
COPY frontend/package.json frontend/yarn.lock frontend/tsconfig.json ./
|
|
COPY frontend/src ./src
|
|
COPY frontend/public ./public
|
|
RUN yarn install
|
|
RUN yarn build --production
|
|
|
|
# Build step #2: build an nginx container
|
|
FROM nginx:stable-alpine
|
|
COPY --from=build-step /frontend/build /usr/share/nginx/html
|
|
COPY deployment/nginx.template /etc/nginx/nginx.template
|
|
|
|
CMD ["nginx", "-g", "daemon off;"] |