mirror of
https://github.com/Canner/WrenAI.git
synced 2026-09-01 15:34:04 +08:00
add nginx as reverse proxy
This commit is contained in:
@@ -106,9 +106,8 @@ services:
|
||||
EXPERIMENTAL_ENGINE_RUST_VERSION: ${EXPERIMENTAL_ENGINE_RUST_VERSION}
|
||||
# configs
|
||||
WREN_PRODUCT_VERSION: ${WREN_PRODUCT_VERSION}
|
||||
ports:
|
||||
# HOST_PORT is the port you want to expose to the host machine
|
||||
- ${HOST_PORT}:3000
|
||||
expose:
|
||||
- 3000
|
||||
volumes:
|
||||
- data:/app/data
|
||||
networks:
|
||||
@@ -116,3 +115,14 @@ services:
|
||||
depends_on:
|
||||
- wren-ai-service
|
||||
- wren-engine
|
||||
|
||||
nginx:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
ports:
|
||||
- 4000:80
|
||||
networks:
|
||||
- wren
|
||||
depends_on:
|
||||
- wren-ui
|
||||
@@ -0,0 +1,18 @@
|
||||
upstream wren_ui_app {
|
||||
server wren-ui:3000;
|
||||
}
|
||||
|
||||
server {
|
||||
location / {
|
||||
# reverse proxy for next server
|
||||
proxy_pass http://wren_ui_app; #Don't forget to update your port number
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
listen 80 default_server;
|
||||
listen [::]:80;
|
||||
}
|
||||
Reference in New Issue
Block a user