Add Dockerfile, remove DB dump for security

This commit is contained in:
Sebastjan 2026-06-07 15:55:34 +02:00
parent dfbd8acba3
commit 245aa55a4e
3 changed files with 28 additions and 610 deletions

8
.dockerignore Normal file
View File

@ -0,0 +1,8 @@
node_modules
dist
.git
*.png
*.jpg
*.sql
.replit
attached_assets

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# Build stage
FROM node:20-bookworm-slim AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 make g++ pkg-config \
&& rm -rf /var/lib/apt/lists/*
COPY package*.json ./
RUN npm install --no-audit --no-fund
COPY . .
RUN npm run build
# Runtime stage
FROM node:20-bookworm-slim
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
EXPOSE 5000
CMD ["node", "dist/index.cjs"]

File diff suppressed because one or more lines are too long