Add Dockerfile and .dockerignore for Dokploy deployment
This commit is contained in:
12
.dockerignore
Normal file
12
.dockerignore
Normal file
@ -0,0 +1,12 @@
|
||||
node_modules/
|
||||
.git/
|
||||
.env
|
||||
*.log
|
||||
.DS_Store
|
||||
.gitignore
|
||||
.nvmrc
|
||||
README.md
|
||||
client/node_modules/
|
||||
server/node_modules/
|
||||
client/dist/
|
||||
client/public/
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM node:24-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY client/package*.json ./client/
|
||||
RUN cd client && npm ci
|
||||
COPY client/ ./client/
|
||||
RUN cd client && npm run build
|
||||
|
||||
FROM node:24-alpine
|
||||
WORKDIR /app
|
||||
COPY server/package*.json ./server/
|
||||
RUN cd server && npm ci --omit=dev
|
||||
COPY server/ ./server/
|
||||
COPY --from=build /app/client/dist ./client/dist
|
||||
EXPOSE 3001
|
||||
CMD ["node", "server/index.js"]
|
||||
Reference in New Issue
Block a user