Skip to content

Commit 955cc83

Browse files
committed
add docker file
1 parent d3c84f8 commit 955cc83

File tree

2 files changed

+34
-12
lines changed

2 files changed

+34
-12
lines changed

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# build stage
2+
FROM node:lts-alpine
3+
4+
ENV VITE_SERVER_URL=http://0.0.0.0:8000/api/v1
5+
6+
WORKDIR /app
7+
8+
COPY ./ ./
9+
10+
RUN npm install -g pnpm
11+
12+
RUN pnpm install
13+
14+
EXPOSE 3000
15+
16+
# production stage
17+
CMD ["pnpm", "run", "dev"]

vite.config.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
import { defineConfig } from 'vite'
2-
import react from '@vitejs/plugin-react-swc'
3-
import path from 'path'
1+
import { defineConfig } from "vite";
2+
import react from "@vitejs/plugin-react-swc";
3+
import path from "path";
44

55
// https://vitejs.dev/config/
66
export default defineConfig({
7-
plugins: [react()],
8-
resolve: {
9-
alias: {
10-
'@app': path.resolve(__dirname, './src'),
11-
},
7+
plugins: [react()],
8+
resolve: {
9+
alias: {
10+
"@app": path.resolve(__dirname, "./src"),
1211
},
12+
},
1313
define: {
1414
"process.env": process.env,
1515
},
16-
// optimizeDeps: {
17-
// include: ['@mui/material/Tooltip'],
18-
// },
19-
})
16+
server: {
17+
watch: {
18+
usePolling: true,
19+
},
20+
host: true,
21+
strictPort: true,
22+
port: 3000,
23+
},
24+
});

0 commit comments

Comments
 (0)