CMD ["sh", "/app/startws.sh"]
python3 python/manage.py runserver 127.0.0.1:9000 &
cargo run --release --manifest-path rust/Cargo.toml &
nginx -g 'daemon off;' &
echo "App is running"
wait
server {
listen 0.0.0.0:8080;
listen [::]:8080;
server_name 807843.xyz;
location /healthz {
return 200 '<body style="background-color: #2b2b2b;font-family: Roboto Mono, monospace;padding: 10px 20px;"><h1 style="color: #e2b714;">200 OK</h1><div style="color: #ddd;font-size: 1.25em;">The site is up 🎉</div></body>';
add_header Content-Type text/html;
}
location /python {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass "http://127.0.0.1:9000/python";
}
location /rust {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass "http://127.0.0.1:9001/rust";
}
location / {
proxy_pass "http://127.0.0.1:9000";
}
error_page 502 /bad_gateway.html;
location /bad_gateway.html {
root /templates;
internal;
}
}
the command cargo run --release --manifest-path rust/Cargo.toml
runs on local machine but not on Render. It seems like it’s “skipped”. The python websocket is working though. When I access /rust I get 502 bad gateway error.