discloud.config
Learn everything about the configuration file for hosting applications on Discloud.
π What is discloud.config and what is it used for?
discloud.config and what is it used for?It is a configuration file that streamlines the process of deploying your applications to Discloud. With this file, you can easily configure the information for each application you upload to the hosting service.
π Placement of the discloud.config File
discloud.config Fileβ Correct Placement
The discloud.config file must be in the root of your project.
your-project/ # β ROOT DIRECTORY
βββ discloud.config # β
REQUIRED HERE
βββ package.json # Example root file
βββ src/ # Source code folder
β βββ index.js # Main application file
βββ .gitignore # Config files
βββ README.md # Documentationβ Invalid Locations
These placements will cause deployment failures:
your-project/
βββ src/
β βββ discloud.config # β SUBFOLDER ERROR
βββ config/
β βββ discloud.config # β SUBFOLDER ERROR
βββ .github/
βββ discloud.config # β HIDDEN FOLDER ERRORπ οΈ Configuration options
See below all the configuration options for the discloud.config file. Click here to check out some examples of different applications.
Define information for your application on the hosting platform, such as NAME and AVATAR. This allows you to easily identify your application on the dashboard or in the Visual Studio Code extension. See:
NAME- determines the name of your application on the hosting platform.AVATAR- uses the image URL as the avatar for your application on the hosting platform.
For your application to start correctly on the hosting, you need to define its type using the TYPE option, set the entry point with the MAIN option, specify the maximum RAM it can use with the RAM option, and indicate the language version with the VERSION option. See below:
TYPE- can have two values: bot or site.MAIN- should contain the path to the main file of your application.RAM- determines the maximum amount of RAM available for the application.VERSION- specifies the language version of your project.
To host a website, a minimum of 512MB of RAM is required, along with a Platinum Plan.
Depending on the programming language of your project, you can define which commands will be executed for the build process and the command to start the application using the BUILD and START properties.
To enable automatic restart in case of failures, set the AUTORESTART option to true (available only for Platinum Plan or higher).
You can install packages using the APT option.
BUILD- defines the command or script for compiling the project.START- defines the command or script for starting the project.AUTORESTART- ensures that the application restarts automatically in case of failure.APT- allows you to specify a list of packages to be installed.
Mandatory options in your discloud.config
discloud.configOnly one field is required:
All other fields are optional and will use smart defaults if omitted:
TYPEdefaults tobotRAMdefaults to100(MB)VERSIONdefaults tolatest
πͺ
Examples of discloud.config files
discloud.config filesSee below examples of discloud.config files for π€ Discord Bots and π Websites and APIs.
Discord bot made in JavaScript where the entry point is the index.js file in the root of the project.
Bot made in TypeScript where the entry point is the index file inside the build folder. The application will start by executing the start script from the package.json file.
Discord bot made in Python where the entry point is the main.py file in the root of the project.
Simple website with plain HTML, using the "friendbook" subdomain from the user's account.
Web API built with Express.js, where the entry file is index.js inside the server folder. The application will start by executing the start script from the package.json file.
βοΈ Configuration options
The discloud.config file contains essential settings for your Discloud application. Below are the available configuration options along with their respective limits and descriptions.
NAME
1 - 30 characters
The name of your application (used for display purposes).
AVATAR
Image URL (.gif, .jpeg, .jpg, .png)
A URL to the application's avatar. Supported formats: GIF, JPEG, JPG, PNG.
TYPE
bot / site
Defines whether the application is a bot or a website.
MAIN
Relative file path
Specifies the main file that should be executed in the project folder.
VERSION
latest / current / suja / specific
Defines the versioning options for the environment and dependencies.
BUILD
(Custom build commands)
If specified, defines commands to run before the application starts (e.g., installing dependencies).
START
(Custom start command)
Overrides the default start command to launch the application.
AUTORESTART
true / false
Determines whether the app should automatically restart if it crashes.
VLAN
true / false
Enables Virtual LAN (VLAN) for internal networking between applications.
HOSTNAME
(Custom hostname)
Specifies a custom hostname for the application.
APT
(List of packages)
Installs additional Linux dependencies required by your app. View available packages.
Last updated