gunicorn
This commit is contained in:
@@ -17,7 +17,7 @@ services:
|
||||
build:
|
||||
context: ./frontend
|
||||
args:
|
||||
- VITE_API_URL=http://6.6.6.66:8000/api
|
||||
- VITE_API_URL=/api
|
||||
# volumes:
|
||||
# - ./frontend:/app
|
||||
# - /app/node_modules
|
||||
|
||||
@@ -12,7 +12,7 @@ RUN npm install --registry=https://registry.npmmirror.com
|
||||
COPY . .
|
||||
|
||||
# 接收构建参数
|
||||
ARG VITE_API_URL=http://localhost:8000/api
|
||||
ARG VITE_API_URL=/api
|
||||
# 设置环境变量供构建时使用
|
||||
ENV VITE_API_URL=$VITE_API_URL
|
||||
|
||||
|
||||
@@ -12,6 +12,24 @@ export default defineConfig({
|
||||
preview: {
|
||||
host: '0.0.0.0',
|
||||
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