mirror of
https://github.com/shirayu/whispering.git
synced 2024-06-13 02:39:23 +00:00
add nginx
This commit is contained in:
parent
841f0a76aa
commit
8e298e20dc
|
@ -63,4 +63,11 @@ services:
|
|||
devices:
|
||||
- driver: nvidia
|
||||
device_ids: [ '3' ]
|
||||
capabilities: [ gpu ]
|
||||
capabilities: [ gpu ]
|
||||
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
ports:
|
||||
- "80:8080"
|
||||
|
|
19
nginx.conf
Normal file
19
nginx.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
user nginx;
|
||||
events {
|
||||
worker_connections 1000;
|
||||
}
|
||||
http {
|
||||
upstream loadbalancer {
|
||||
server whisper-0:7000 weight=1;
|
||||
server whisper-1:7001 weight=1;
|
||||
server whisper-2:7002 weight=1;
|
||||
server whisper-3:7003 weight=1;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
location / {
|
||||
proxy_pass http://loadbalancer;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue