No description
- Dockerfile 100%
|
All checks were successful
build-and-push / build-and-push (push) Successful in 19s
|
||
|---|---|---|
| .forgejo/workflows | ||
| .gitlab-ci.yml | ||
| default.conf | ||
| Dockerfile | ||
| README.md | ||
nginx-spa
This is a base image with nginx configured for single page applications
Example usage:
# Build the SPA
FROM node:18-buster-slim AS builder
ARG REACT_APP_BACKEND_URL
ENV REACT_APP_BACKEND_URL=$REACT_APP_BACKEND_URL
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm ci
COPY . .
RUN npm run build
# Copy the Build output into the nginx base image
FROM registry.reindruecken.de/baseimages/nginx-spa
COPY --from=builder /app/build/ /usr/share/nginx/html