How to change python version on digitalocean
The App Platform is designed on the top of DigitalOcean Kubernetes, so it can provide the power, scale and flexibility of Kubernetes in a simple way. The App Platform also provides customers with higher visibility into the infrastructure. It will give customers the choice of how they want to scale their applications, either through a fully managed and integrated App Platform scaling mechanism or by taking more control over their infrastructure setup.
Deploying an application into digitalocean is super easy. DigitalOcean provides developers cloud services that help to deploy and scale applications that run simultaneously on multiple computers. To deploy a python application in digitalocean using spesific version, you need to create file runtime.txt and write the version that you wanna use. This is the version that you could inside digitalocean.
- python-3.10.0
- python-3.9.7
- python-3.8.12
- python-3.7.12
- python-3.6.15
Write one of the version below in runtime.txt. And redeploy your application. The runtime.txt format is case-sensitive and must not include spaces. You must also specify all three version number components (major, minor, and patch) in runtime.txt for example python-3.9.7. If you don’t follow this format, your app will fail to deploy. If the deployment still fail make sure you already choose the right plan for your application. Because the deployment limit is different between each plans.
For your information, the local filesystem on the host instances running App Platform containers is ephemeral and limited to 2GiB. When deployments happen or containers are replaced, the local disk storage will be LOST and not recoverable. To use App Platform, you must re-implement or reconfigure your app to use other forms of persistent storage such as Spaces or Managed Databases. The local disk should only be used as temporary storage. Filling the disk to capacity will cause the container to be detected as unhealthy and replaced.