initial commit
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM node:24-bookworm-slim AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY index.html tsconfig.json vite.config.ts ./
|
||||
COPY src ./src
|
||||
COPY shared ./shared
|
||||
COPY public ./public
|
||||
COPY scripts ./scripts
|
||||
RUN npm run build && npm prune --omit=dev
|
||||
|
||||
FROM node:24-bookworm-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates libreoffice-writer && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY package*.json ./
|
||||
COPY server ./server
|
||||
COPY shared ./shared
|
||||
RUN mkdir .data && chown node:node .data
|
||||
USER node
|
||||
ENV HOST=0.0.0.0 PORT=3001
|
||||
EXPOSE 3001
|
||||
CMD ["node", "server/index.js"]
|
||||
Reference in New Issue
Block a user