Closed Jone8293 closed 5 months ago
You are querying "localhost" but your server is in the cloud. Localhost is for your computer.
You will need to hit the public IP. For example: 123.89.46.72:8000/v1/run. You can find the public IP in whatever cloud you are using dashboard. You will also need to set up a bunch of stuff, like firewall, and opening the right port. These are different from one cloud to another.
For production, you need something like Nginx as well as setting up SSL.
Roughly the steps are (in EC2) for a non-production setting are:
Hello,
I've encountered several issues when trying to deploy the provided code following the guide in the README. I've attempted to set up the environment on AWS EC2 with Linux, Ubuntu, and also on Azure, but unfortunately ran into errors that are possibly indicative of underlying code or configuration issues.
Steps I followed: Cloned the GitHub repository with: bash Copy code git clone https://github.com/Jonathan-Adly/agentrun Navigated into the agentrun/agentrun-api directory. Copied the .env.example to .env.dev as suggested for development. Initiated the Docker setup with: css Copy code docker-compose up -d --build This was expected to give me a fully operational code execution API.
Test Executions: To verify the setup, I executed the provided examples to invoke the REST API:
JavaScript Fetch API:
javascript Copy code fetch('http://localhost:8000/v1/run/', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({code: "print('hello, world!')"}) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); CURL via Terminal:
bash Copy code curl -X POST http://localhost:8000/v1/run/ -H "Content-Type: application/json" -d '{"code": "print(\'hello, world!\')"}' Issue Encountered: Unfortunately, the POST request fails without a successful response or any meaningful error message that could guide troubleshooting.
Considering the range of environments (AWS EC2/Azure) and following the instructions as documented, it seems there might be a crucial detail missing or a potential incompatibility within the codebase.
Request: Could you please provide more information on the technical stack (dependencies, versions, etc.) tailored for this project? It will be beneficial for debugging the current issue and ensuring compatibility of the setup with the proposed environments.
Moreover, any insights or additional steps that might have been overlooked in the documentation would be highly appreciated.
Thank you for your attention to this matter, and I look forward to your guidance.
Best regards,