feat: deploy update
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,20 +1,25 @@
|
||||
FROM node:22-slim AS frontend
|
||||
RUN corepack enable pnpm
|
||||
WORKDIR /app/web
|
||||
COPY web/package.json ./
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY web/ ./
|
||||
RUN npm run build
|
||||
RUN pnpm run build
|
||||
|
||||
FROM node:22-slim AS production
|
||||
RUN corepack enable pnpm
|
||||
WORKDIR /app
|
||||
|
||||
# Build tools needed to compile better-sqlite3 native addon
|
||||
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY server/package.json ./server/
|
||||
WORKDIR /app/server
|
||||
RUN npm install --omit=dev
|
||||
RUN pnpm install --prod
|
||||
|
||||
COPY server/ ./
|
||||
COPY --from=frontend /app/web/dist /app/web/dist
|
||||
|
||||
EXPOSE 3456
|
||||
|
||||
CMD ["npx", "tsx", "src/index.ts"]
|
||||
CMD ["pnpm", "exec", "tsx", "src/index.ts"]
|
||||
|
||||
Reference in New Issue
Block a user