add nginx

This commit is contained in:
ricwo 2022-11-10 17:38:39 +01:00
parent 841f0a76aa
commit 8e298e20dc
2 changed files with 27 additions and 1 deletions

View file

@ -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
View 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;
}
}
}