更新dockerfile
This commit is contained in:
@@ -2,4 +2,4 @@
|
|||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 本地环境接口地址
|
# 本地环境接口地址
|
||||||
VITE_API_URL = 'http://192.168.3.11:8808/'
|
VITE_API_URL = 'http://192.168.3.200:8808/'
|
||||||
|
|||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM node:18-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm install --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
EXPOSE 5173
|
||||||
|
|
||||||
|
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
|
||||||
@@ -22,7 +22,7 @@ const service: AxiosInstance = axios.create({
|
|||||||
const newService: AxiosInstance = axios.create({
|
const newService: AxiosInstance = axios.create({
|
||||||
// baseURL: 'http://192.168.3.95:8000/',
|
// baseURL: 'http://192.168.3.95:8000/',
|
||||||
// baseURL: 'http://192.168.3.49:8000/',
|
// baseURL: 'http://192.168.3.49:8000/',
|
||||||
baseURL: 'http://192.168.3.11:8000/',
|
baseURL: 'http://192.168.3.200:8000/',
|
||||||
timeout: 50000,
|
timeout: 50000,
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
paramsSerializer: {
|
paramsSerializer: {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
|
|||||||
// },
|
// },
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://192.168.3.49:8808',
|
target: 'http://192.168.3.200:8808',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user