Skip to content

Commit

Permalink
dockerfile dockerignore file added (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekrawat21 authored Oct 13, 2024
1 parent 20491a3 commit eb194c2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
npm-debug.log
dist
.git
.gitignore

23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:18-alpine AS builder

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build

FROM node:18-alpine AS runner

WORKDIR /app

COPY --from=builder /app ./

RUN npm install

EXPOSE 5173

CMD ["npm", "run", "dev"]
4 changes: 4 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: true,
port: 5173,
},
})

0 comments on commit eb194c2

Please sign in to comment.