gunicorn
This commit is contained in:
@@ -17,7 +17,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
args:
|
args:
|
||||||
- VITE_API_URL=http://6.6.6.66:8000/api
|
- VITE_API_URL=/api
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./frontend:/app
|
# - ./frontend:/app
|
||||||
# - /app/node_modules
|
# - /app/node_modules
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ RUN npm install --registry=https://registry.npmmirror.com
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# 接收构建参数
|
# 接收构建参数
|
||||||
ARG VITE_API_URL=http://localhost:8000/api
|
ARG VITE_API_URL=/api
|
||||||
# 设置环境变量供构建时使用
|
# 设置环境变量供构建时使用
|
||||||
ENV VITE_API_URL=$VITE_API_URL
|
ENV VITE_API_URL=$VITE_API_URL
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,24 @@ export default defineConfig({
|
|||||||
preview: {
|
preview: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 15173,
|
port: 15173,
|
||||||
allowedHosts: ['market.quant-speed.com']
|
allowedHosts: ['market.quant-speed.com'],
|
||||||
|
proxy: {
|
||||||
|
'/api': {
|
||||||
|
target: 'http://backend:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
|
'/admin': {
|
||||||
|
target: 'http://backend:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
|
'/static': {
|
||||||
|
target: 'http://backend:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
|
'/media': {
|
||||||
|
target: 'http://backend:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user