Start command not running

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.

Hi,

With Docker you’re in control of the environment, nothing would be “skipped” because it was deployed to Render, unless you’ve override the CMD with the “Docker Command” setting.

Also Render doesn’t support IPv6 currently ([::]), so maybe remove that to rule out that causing any issues.

Are your logs showing anything in relation to the Rust endpoint?

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.