generated from nholtware/service-template-react
Initial commit
This commit is contained in:
commit
3a8e7184d5
32 changed files with 5218 additions and 0 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Build stage: Vite -> static dist/. GIT_SHA is passed by the build-push action.
|
||||
FROM node:22.23.4-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
ARG GIT_SHA=dev
|
||||
ENV VITE_GIT_SHA=${GIT_SHA}
|
||||
RUN npx vite build
|
||||
|
||||
# Runtime stage: static files only, no Node. Runs as uid 101, listens on 8080.
|
||||
FROM nginxinc/nginx-unprivileged:1.31.7-alpine
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --chmod=0755 docker-entrypoint.d/10-config.sh /docker-entrypoint.d/10-config.sh
|
||||
# html dir owned by nginx so 10-config.sh can write config.js at start.
|
||||
COPY --from=build --chown=101:101 /app/dist /usr/share/nginx/html
|
||||
EXPOSE 8080
|
||||
Loading…
Add table
Add a link
Reference in a new issue