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/website/Dockerfile

26 lines
475 B
Docker
Raw Normal View History

2024-10-04 21:11:55 +01:00
FROM node:20-alpine3.17 AS base
2024-10-04 21:07:09 +01:00
# Install pnpm
RUN npm install -g pnpm
ENV PNPM_HOME=/usr/local/bin
2024-10-04 20:35:44 +01:00
2024-10-04 21:39:39 +01:00
FROM base AS runner
2024-10-04 20:35:44 +01:00
WORKDIR /app
2024-10-04 20:38:36 +01:00
# Copy website package and lock files only
2024-10-04 21:07:09 +01:00
COPY package.json* pnpm-lock.yaml* pnpm-workspace.yaml* ./
2024-10-04 21:21:57 +01:00
COPY website ./website
2024-10-04 20:35:44 +01:00
2024-10-04 21:23:47 +01:00
ARG GIT_REV
ENV GIT_REV=${GIT_REV}
2024-10-04 21:21:08 +01:00
RUN pnpm install --filter website
RUN pnpm run build:website
2024-10-04 20:35:44 +01:00
# Expose the app port and start it
EXPOSE 3000
ENV HOSTNAME="0.0.0.0"
ENV PORT=3000
2024-10-04 21:21:08 +01:00
CMD ["pnpm", "start:website"]