chore: add Dockerfile for deployment
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
node_modules
|
||||||
|
data
|
||||||
|
.env
|
||||||
|
.git
|
||||||
|
docs
|
||||||
|
test
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
FROM node:22-slim AS build
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends python3 build-essential \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
FROM node:22-slim
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app .
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD ["node", "server.js"]
|
||||||
Reference in New Issue
Block a user