This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/projects/website/Dockerfile
2024-10-08 15:32:02 +01:00

26 lines
475 B
Docker

FROM node:20-alpine3.17 AS base
# Install pnpm
RUN npm install -g pnpm
ENV PNPM_HOME=/usr/local/bin
FROM base AS runner
WORKDIR /app
# Copy website package and lock files only
COPY package.json* pnpm-lock.yaml* pnpm-workspace.yaml* ./
COPY website ./website
ARG GIT_REV
ENV GIT_REV=${GIT_REV}
RUN pnpm install --filter website
RUN pnpm run build:website
# Expose the app port and start it
EXPOSE 3000
ENV HOSTNAME="0.0.0.0"
ENV PORT=3000
CMD ["pnpm", "start:website"]