feat(admin-web): display environment badge in admin console feat(admin-web): configure Nginx for SPA and copy config fix(Makefile): fix typo in CR_ADMIN_IMAGE_URI variable assignment feat(firebase): update launchpad title to "Launchpad"
30 lines
674 B
Docker
30 lines
674 B
Docker
# STAGE 1: Build the React application
|
|
FROM node:20-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files and install dependencies
|
|
COPY package.json package-lock.json ./
|
|
RUN npm install
|
|
|
|
# Copy the rest of the application source code
|
|
COPY . .
|
|
|
|
# Build the application for production
|
|
RUN npm run build
|
|
|
|
# STAGE 2: Serve the static files with Nginx
|
|
FROM nginx:alpine
|
|
|
|
# Copy the built files from the build stage
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
# Copy the custom Nginx configuration
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Expose the port Nginx is listening on
|
|
EXPOSE 8080
|
|
|
|
# Command to run Nginx in the foreground
|
|
CMD ["nginx", "-g", "daemon off;"]
|