Files
guitar-practice-tool/Dockerfile
T
2026-07-23 10:40:33 +02:00

23 lines
641 B
Docker

# --- Build stage ---------------------------------------------------------------
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
# Base path baked at build time. Default '/' (dedicated domain).
# For a subpath deploy: docker build --build-arg VITE_BASE=/practice/ .
ARG VITE_BASE=/
ENV VITE_BASE=$VITE_BASE
RUN pnpm run build
# --- Serve stage ---------------------------------------------------------------
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80