Skip to content

Commit ea1824a

Browse files
authored
chatqna-core: Update nginx configuration for Docker deployment (open-edge-platform#242)
Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>
1 parent d1d3946 commit ea1824a

File tree

3 files changed

+57
-4
lines changed

3 files changed

+57
-4
lines changed

sample-applications/chat-question-and-answer-core/docker/compose.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
services:
2-
nginx:
2+
nginx-cpu:
33
image: nginx:latest
4+
profiles:
5+
- DEFAULT
46
ports:
57
- "8102:80"
68
volumes:
7-
- ../nginx.conf:/etc/nginx/nginx.conf:ro
9+
- ../nginx_config/nginx-cpu.conf:/etc/nginx/nginx.conf:ro
810
depends_on:
9-
- chatqna-core
10-
- chatqna-core-ui
11+
- chatqna-core
12+
- chatqna-core-ui
13+
14+
nginx-gpu:
15+
image: nginx:latest
16+
profiles:
17+
- GPU-DEVICE
18+
ports:
19+
- "8102:80"
20+
volumes:
21+
- ../nginx_config/nginx-gpu.conf:/etc/nginx/nginx.conf:ro
22+
depends_on:
23+
- chatqna-core-gpu
24+
- chatqna-core-ui
25+
1126
chatqna-core:
1227
image: ${REGISTRY:-}chatqna:${BACKEND_TAG:-latest}
1328
profiles:
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
events {}
2+
3+
http {
4+
server {
5+
listen 80;
6+
listen [::]:80;
7+
8+
client_max_body_size 500M;
9+
proxy_read_timeout 300;
10+
proxy_connect_timeout 300;
11+
proxy_send_timeout 300;
12+
13+
location / {
14+
proxy_pass http://chatqna-core-ui:80;
15+
proxy_http_version 1.1;
16+
proxy_set_header Upgrade $http_upgrade;
17+
proxy_set_header Connection "Upgrade";
18+
proxy_set_header Host $host;
19+
proxy_set_header X-Real-IP $remote_addr;
20+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
21+
proxy_set_header X-Forwarded-Proto $scheme;
22+
proxy_cache_bypass $http_upgrade;
23+
}
24+
25+
location /v1/chatqna {
26+
proxy_pass http://chatqna-core-gpu:8888;
27+
proxy_http_version 1.1;
28+
proxy_set_header Upgrade $http_upgrade;
29+
proxy_set_header Connection "Upgrade";
30+
proxy_set_header Host $host;
31+
proxy_set_header X-Real-IP $remote_addr;
32+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
33+
proxy_set_header X-Forwarded-Proto $scheme;
34+
proxy_cache_bypass $http_upgrade;
35+
}
36+
37+
}
38+
}

0 commit comments

Comments
 (0)