switch back to dokku

This commit is contained in:
Chris Grimmett 2024-02-26 14:00:23 -08:00
parent b56b694270
commit 4dd1531a9c
3 changed files with 36 additions and 0 deletions

3
.dokku/README.md Normal file
View File

@ -0,0 +1,3 @@
https://dokku.com/docs/advanced-usage/deployment-tasks/?h=monorepo#changing-the-appjson-location
https://dokku.com/docs/deployment/builders/dockerfiles/

8
.dokku/next.app.json Normal file
View File

@ -0,0 +1,8 @@
{
"scripts": {
"dokku": {
"predeploy": "echo hello-world-predeploy",
"postdeploy": "echo hello-world-postdeploy"
}
}
}

25
next.Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM node:20-slim AS base
ENV NEXT_TELEMETRY_DISABLED 1
RUN corepack enable
FROM base AS build
WORKDIR /usr/src/fp-monorepo
RUN mkdir /usr/src/next
COPY ./pnpm-lock.yaml ./
COPY ./pnpm-workspace.yaml ./
COPY ./packages/next/package.json ./packages/next/
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store pnpm install
COPY . .
RUN pnpm deploy --filter=fp-next /usr/src/next
FROM base AS dev
WORKDIR /app
COPY --from=build /usr/src/next /app
CMD ["pnpm", "run", "dev"]
FROM base AS next
WORKDIR /app
COPY --from=build /usr/src/next /app
COPY ./packages/next/app.json /app
ENTRYPOINT ["pnpm"]
CMD ["start"]