Spaces:
Sleeping
Sleeping
Download Dockerfile from adhfdshfdsf/tg-api: direct link, hf CLI and curl.
- Browser
- Download file 852 Bytes
-
https://huggingface.co/spaces/adhfdshfdsf/tg-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/adhfdshfdsf/tg-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/adhfdshfdsf/tg-api/resolve/main/Dockerfile
852 Bytes
| FROM nginx:alpine | |
| RUN printf "server { \n\ | |
| listen 7860; \n\ | |
| server_name _; \n\ | |
| resolver 8.8.8.8 ipv6=off valid=30s; \n\ | |
| \n\ | |
| # Трюк: сохраняем домен в переменную, чтобы Nginx не проверял его при запуске \n\ | |
| set \$backend api.telegram.org; \n\ | |
| \n\ | |
| location / { \n\ | |
| proxy_pass https://\$backend/; \n\ | |
| proxy_set_header Host \$backend; \n\ | |
| proxy_ssl_server_name on; \n\ | |
| proxy_ssl_name \$backend; \n\ | |
| \n\ | |
| proxy_buffering off; \n\ | |
| proxy_request_buffering off; \n\ | |
| proxy_http_version 1.1; \n\ | |
| proxy_set_header Connection \"\"; \n\ | |
| proxy_connect_timeout 60s; \n\ | |
| proxy_read_timeout 600s; \n\ | |
| } \n\ | |
| }" > /etc/nginx/conf.d/default.conf | |
| EXPOSE 7860 | |
| CMD ["nginx", "-g", "daemon off;"] |