By Amila Deshan
Hi,
I have a Python script that I want to deploy as an app on DigitalOcean. My main concern is whether the App Platform will ensure the app is constantly running because I’m using the script as a WebSocket server. The script needs to always be running on the server.
I’m deploying it using the following command:
uvicorn main:app --host 0.0.0.0 --port 10000
Can anyone explain how I can achieve this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya, @amiladeshan
I believe a similar question was asked in the community which you can check here:
Services that you run on the App Platform are exposed via app domains on port 443/HTTPS. So you should also use the wss://
scheme when connecting. This is not necessarily the same port as you would specify that your service is listening on internally.
Hope that this helps!
Heya,
The short answer is yes, it will do it for you. The a bit longer answer you can check in the mentioned discussion.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.