|
1 | 1 | events { } |
2 | 2 | http { |
| 3 | + upstream botium-speech-frontend { |
| 4 | + server frontend:56000; |
| 5 | + } |
| 6 | + upstream botium-speech-dictate { |
| 7 | + server dictate:56100; |
| 8 | + } |
| 9 | + upstream botium-speech-tts { |
| 10 | + server tts:59125; |
| 11 | + } |
| 12 | + upstream botium-speech-stt-en { |
| 13 | + server stt-en:56180; |
| 14 | + } |
| 15 | + upstream botium-speech-stt-de { |
| 16 | + server stt-de:56180; |
| 17 | + } |
| 18 | + |
3 | 19 | server { |
4 | 20 | listen 80; |
5 | 21 | client_max_body_size 50M; |
6 | 22 |
|
7 | 23 | rewrite ^/tts$ /tts/ redirect; |
8 | 24 | location /tts/ { |
9 | | - resolver 127.0.0.11 valid=30s; |
10 | | - set $upstream_tts tts; |
11 | 25 | rewrite ^\/tts\/(.*) /$1 break; |
12 | 26 | proxy_http_version 1.1; |
13 | 27 | proxy_cache_bypass $http_upgrade; |
14 | 28 | proxy_set_header Upgrade $http_upgrade; |
15 | 29 | proxy_set_header Connection "Upgrade"; |
16 | 30 | proxy_set_header Host $host; |
17 | 31 | proxy_set_header X-Forwarded-Host $http_host; |
18 | | - proxy_pass http://$upstream_tts:59125; |
| 32 | + proxy_pass http://botium-speech-tts; |
19 | 33 | proxy_read_timeout 300; |
20 | 34 | } |
21 | 35 | rewrite ^/stt-en$ /stt-en/ redirect; |
22 | 36 | location /stt-en/ { |
23 | | - resolver 127.0.0.11 valid=30s; |
24 | | - set $upstream_stt_en stt-en; |
25 | 37 | rewrite ^\/stt-en\/(.*) /$1 break; |
26 | 38 | proxy_http_version 1.1; |
27 | 39 | proxy_cache_bypass $http_upgrade; |
28 | 40 | proxy_set_header Upgrade $http_upgrade; |
29 | 41 | proxy_set_header Connection "Upgrade"; |
30 | 42 | proxy_set_header Host $host; |
31 | 43 | proxy_set_header X-Forwarded-Host $http_host; |
32 | | - proxy_pass http://$upstream_stt_en:56180; |
| 44 | + proxy_pass http://botium-speech-stt-en; |
33 | 45 | proxy_read_timeout 300; |
34 | 46 | } |
35 | 47 | rewrite ^/stt-de$ /stt-de/ redirect; |
36 | 48 | location /stt-de/ { |
37 | | - resolver 127.0.0.11 valid=30s; |
38 | | - set $upstream_stt_de stt-de; |
39 | 49 | rewrite ^\/stt-de\/(.*) /$1 break; |
40 | 50 | proxy_http_version 1.1; |
41 | 51 | proxy_cache_bypass $http_upgrade; |
42 | 52 | proxy_set_header Upgrade $http_upgrade; |
43 | 53 | proxy_set_header Connection "Upgrade"; |
44 | 54 | proxy_set_header Host $host; |
45 | 55 | proxy_set_header X-Forwarded-Host $http_host; |
46 | | - proxy_pass http://$upstream_stt_de:56180; |
| 56 | + proxy_pass http://botium-speech-stt-de; |
47 | 57 | proxy_read_timeout 300; |
48 | 58 | } |
49 | 59 | rewrite ^/dictate$ /dictate/ redirect; |
50 | 60 | location /dictate/ { |
51 | | - resolver 127.0.0.11 valid=30s; |
52 | | - set $upstream_dictate dictate; |
53 | 61 | rewrite ^\/dictate\/(.*) /$1 break; |
54 | 62 | proxy_set_header Host $host; |
55 | 63 | proxy_set_header X-Forwarded-Host $http_host; |
56 | | - proxy_pass http://$upstream_dictate:56100; |
| 64 | + proxy_pass http://botium-speech-dictate; |
57 | 65 | } |
58 | 66 | location / { |
59 | | - resolver 127.0.0.11 valid=30s; |
60 | | - set $upstream_frontend frontend; |
61 | 67 | proxy_http_version 1.1; |
62 | 68 | proxy_cache_bypass $http_upgrade; |
63 | 69 | proxy_set_header Upgrade $http_upgrade; |
64 | 70 | proxy_set_header Connection "Upgrade"; |
65 | 71 | proxy_set_header Host $host; |
66 | 72 | proxy_set_header X-Forwarded-Host $http_host; |
67 | | - proxy_pass http://$upstream_frontend:56000; |
| 73 | + proxy_pass http://botium-speech-frontend; |
68 | 74 | proxy_read_timeout 300; |
69 | 75 | } |
70 | 76 | } |
|
0 commit comments