File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ developmentMode = false
77[server ]
88maxUploadSize = 1000 # MB
99port = 8501 # should be same as configured in deployment repo
10+ address = " 0.0.0.0"
11+ enableCORS = false
12+ enableXsrfProtection = false
13+
1014
1115[theme ]
1216# The preset Streamlit theme that your custom theme inherits from. One of "light" or "dark".
Original file line number Diff line number Diff line change @@ -195,11 +195,11 @@ if [ "$SERVER_COUNT" -gt 1 ]; then\n\
195195 mkdir -p /etc/nginx\n \
196196 echo -e "worker_processes auto;\\npid /run/nginx.pid;\\n\\nevents {\\n worker_connections 1024;\\n}\\n\\nhttp {\\n client_max_body_size 0;\\n\\n map \\$cookie_stroute \\$route_key {\\n \\x22\\x22 \\$request_id;\\n default \\$cookie_stroute;\\n }\\n\\n upstream streamlit_backend {\\n hash \\$route_key consistent;\\n${UPSTREAM_SERVERS} }\\n\\n map \\$http_upgrade \\$connection_upgrade {\\n default upgrade;\\n \\x27\\x27 close;\\n }\\n\\n server {\\n listen 0.0.0.0:8501;\\n\\n location / {\\n proxy_pass http://streamlit_backend;\\n proxy_http_version 1.1;\\n proxy_set_header Upgrade \\$http_upgrade;\\n proxy_set_header Connection \\$connection_upgrade;\\n proxy_set_header Host \\$host;\\n proxy_set_header X-Real-IP \\$remote_addr;\\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\\n proxy_set_header X-Forwarded-Proto \\$scheme;\\n proxy_read_timeout 86400;\\n proxy_send_timeout 86400;\\n proxy_buffering off;\\n add_header Set-Cookie \\x22stroute=\\$route_key; Path=/; HttpOnly; SameSite=Lax\\x22 always;\\n }\\n }\\n}" > /etc/nginx/nginx.conf\n\
197197\n \
198- # Start Streamlit instances on internal ports (localhost only) \n \
198+ # Start Streamlit instances on internal ports\n \
199199 for i in $(seq 0 $((SERVER_COUNT - 1))); do\n \
200200 PORT=$((BASE_PORT + i))\n \
201201 echo "Starting Streamlit instance on port $PORT..."\n \
202- streamlit run app.py --server.port $PORT --server.address 127 .0.0.1 &\n \
202+ streamlit run app.py --server.port $PORT --server.address 0 .0.0.0 &\n \
203203 done\n \
204204\n \
205205 sleep 2\n \
@@ -208,7 +208,7 @@ if [ "$SERVER_COUNT" -gt 1 ]; then\n\
208208else\n \
209209 # Single instance mode (default) - run Streamlit directly on port 8501\n \
210210 echo "Starting Streamlit app..."\n \
211- exec streamlit run app.py\n \
211+ exec streamlit run app.py --server.address 0.0.0.0 \n \
212212fi\n \
213213' > /app/entrypoint.sh
214214# make the script executable
You can’t perform that action at this time.
0 commit comments