diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..a598ead8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +npm-debug.log +dist +.git +.gitignore + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..fab05eee --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/vite.config.js b/vite.config.js index 5a33944a..57244615 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,4 +4,8 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + server: { + host: true, + port: 5173, + }, })