adhfdshfdsf commited on
Commit
dbc69c9
·
verified ·
1 Parent(s): 70cdde3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -8
Dockerfile CHANGED
@@ -2,18 +2,28 @@ FROM nginx:alpine
2
  RUN echo 'server { \
3
  listen 7860; \
4
  server_name _; \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  location / { \
6
  proxy_pass https://api.anthropic.com/; \
7
- proxy_ssl_server_name on; \
8
  proxy_set_header Host api.anthropic.com; \
9
  proxy_set_header X-Real-IP $remote_addr; \
10
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \
11
- proxy_buffering off; \
12
- proxy_cache off; \
13
- chunked_transfer_encoding on; \
14
- proxy_connect_timeout 600; \
15
- proxy_send_timeout 600; \
16
- proxy_read_timeout 600; \
17
  } \
18
  }' > /etc/nginx/conf.d/default.conf
19
  EXPOSE 7860
 
2
  RUN echo 'server { \
3
  listen 7860; \
4
  server_name _; \
5
+ \
6
+ # Оптимизация для всех нейросетей \
7
+ proxy_buffering off; \
8
+ proxy_cache off; \
9
+ chunked_transfer_encoding on; \
10
+ proxy_ssl_server_name on; \
11
+ proxy_connect_timeout 600; \
12
+ proxy_send_timeout 600; \
13
+ proxy_read_timeout 600; \
14
+ \
15
+ # 1. Маршрут для Codex (OpenAI) \
16
+ location ~* ^/v1/(chat|completions|engines|models) { \
17
+ proxy_pass https://api.openai.com; \
18
+ proxy_set_header Host api.openai.com; \
19
+ proxy_set_header X-Real-IP $remote_addr; \
20
+ } \
21
+ \
22
+ # 2. Маршрут для Claude (Anthropic) - по умолчанию \
23
  location / { \
24
  proxy_pass https://api.anthropic.com/; \
 
25
  proxy_set_header Host api.anthropic.com; \
26
  proxy_set_header X-Real-IP $remote_addr; \
 
 
 
 
 
 
 
27
  } \
28
  }' > /etc/nginx/conf.d/default.conf
29
  EXPOSE 7860