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
Liam e6600a8b48
Some checks failed
Deploy Backend / deploy (push) Failing after 25s
Deploy Website / deploy (push) Failing after 16s
oops, build common
2024-10-09 01:19:41 +01:00

34 lines
711 B
Docker

FROM oven/bun:1.1.30-alpine AS base
# Install dependencies
FROM base AS depends
WORKDIR /app
COPY . .
RUN bun install --frozen-lockfile
# Run the app
FROM base AS runner
WORKDIR /app
# Set the environment
ENV NODE_ENV production
ARG GIT_REV
ENV GIT_REV=${GIT_REV}
COPY --from=depends /app/projects/common ./projects/common
RUN bun --filter common build
COPY --from=depends /app/node_modules ./node_modules
COPY --from=depends /app/package.json* /app/bun.lockb* ./
COPY --from=depends /app/projects/website ./projects/website
# Build the website
RUN bun run --filter website build
# Expose the app port
EXPOSE 3000
ENV HOSTNAME="0.0.0.0"
ENV PORT=3000
CMD ["bun", "run", "--filter", "backend", "start"]