mirror of
https://github.com/bartvdbraak/hellob.art.git
synced 2025-06-28 23:39:11 +00:00
Move to Docker build without Vercel
This commit is contained in:
parent
16221dec61
commit
1e6059f745
16 changed files with 160 additions and 627 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
|||
FROM node:22-slim AS base
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
|
||||
FROM base AS prod
|
||||
|
||||
RUN mkdir /app
|
||||
COPY pnpm-lock.yaml /app
|
||||
WORKDIR /app
|
||||
RUN pnpm fetch --prod
|
||||
|
||||
COPY . /app
|
||||
RUN pnpm run build
|
||||
|
||||
FROM base
|
||||
COPY --from=prod /app/node_modules /app/node_modules
|
||||
COPY --from=prod /app/dist /app/dist
|
||||
EXPOSE 8000
|
||||
CMD [ "pnpm", "preview", "--", "--port", "8000", "--host" ]
|
Loading…
Add table
Add a link
Reference in a new issue