๐ Introduction
- Before you begin, make sure you have Python installed on your system. If not, download it from the official Python website.
- Create an account on DS Cloud via the login page using your email, Discord, or both.
- Ensure you have an active paid plan. View and purchase plans here.
โ๏ธ Creating the DS Cloud Config File
Learn how to create the configuration file for DS Cloud.
The
dscloud.pt file configures your application, defining its name, description, version, main file, and more.๐ Required Files
main.py(main application file).- requirements.txt (dependency file).
- dscloud.pt (DS Cloud configuration file).
โถ๏ธ Start Application
- If the
STARTfield is not defined in the configuration file, DS Cloud will runpython MAIN, whereMAINis the file specified in theMAINfield of the configuration file. If theSTARTfield is defined, its value will be executed directly. Learn more about configuration file parameters here. - DS Cloud uses
pip installto install all dependencies listed in therequirements.txt.
๐ฅ๏ธ Preparing Your Python Project
When preparing your Python project for deployment on DS Cloud, ensure your project files are correctly configured and ready for deployment.๐ Essential Configuration Files
- dscloud.pt/.config
- Main application file (
main.py) - Dependency file (
requirements.txtorpyproject.toml)
๐๏ธ Files to Exclude Before Uploading
ffmpeg: Pre-installed in the DS Cloud environment..venv: DS Cloud provides an isolated environment.poetry.lock: Excluded for compatibility reasons.
๐ค Why Exclude These Files?
Excludingffmpeg, .venv, and poetry.lock ensures:
- Clean Environment: Avoids conflicts with the cloud environmentโs configurations.
- Efficiency: Reduces upload size, streamlining the process.
- Compatibility: Relies on
requirements.txtfor dependency installation.
๐ก Troubleshooting
Invalid or Corrupted Main File
Invalid or Corrupted Main File
Ensure the
MAIN field in the configuration file correctly points to your main.py file. For files in subfolders, use the format folder/file.py.Insufficient Memory
Insufficient Memory
Minimum RAM requirements:
- Bots: 256MB
- Websites/APIs: 512MB Depending on your applicationโs size and complexity, allocate more RAM to avoid the LACK_OF_RAM error.
๐ค Uploading Your Project to DS Cloud
After preparing your project files, upload them to DS Cloud to host your application.- Discord Upload
- Go to the DS Cloud Discord server and use the
/upcommand in the#commandschannel. - A new private channel will be created for you.
- Upload your
.zipfile in the created channel to deploy your application.
