Add Dockerfile for deployment

This commit is contained in:
2026-03-30 21:35:20 +00:00
parent 0680d08fe8
commit 14aa2dec09
3 changed files with 21 additions and 2 deletions

6
.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
node_modules
dist
.git
.gitignore
*.md
.env*

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["npm", "run", "start"]

View File

@@ -11,10 +11,11 @@
"build:client": "vite build", "build:client": "vite build",
"build:server": "tsc -p tsconfig.server.json", "build:server": "tsc -p tsconfig.server.json",
"prebuild": "npm install", "prebuild": "npm install",
"build": "npm run build:client", "prebuild": "npm ci",
"build": "npm run build:client && npm run build:server",
"lint": "eslint .", "lint": "eslint .",
"preview": "vite preview", "preview": "vite preview",
"start": "tsx src/server/index.ts" "start": "node dist/server/index.js"
}, },
"dependencies": { "dependencies": {
"tsx": "^4.21.0", "tsx": "^4.21.0",