chore: migrate deployment to Dockerfile
Replace nixpacks.toml with a multi-stage Dockerfile (node:22-alpine builder + nginx:alpine runner) for faster Coolify deployments.
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM node:22-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
|
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN pnpm run build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[phases.setup]
|
|
||||||
nixPkgs = ['nodejs_22', 'pnpm']
|
|
||||||
|
|
||||||
[phases.install]
|
|
||||||
cmds = ['pnpm install']
|
|
||||||
|
|
||||||
[phases.build]
|
|
||||||
cmds = ['pnpm run build']
|
|
||||||
Reference in New Issue
Block a user