Skip to main content

Guide to Setting Up a Project Using Git

This guide will walk you through the process of setting up a project using Git. Please follow the steps below carefully.

caution

If your application requires the installation of additional programs (such as ffmpeg or mysql-client), write the installation commands in the run.sh file and place this file in the root folder of your project.

Sample run.sh file:

#!/bin/bash

# ffmpeg (debian package)
sudo apt install -y ffmpeg

# mysql
sudo apt install -y gcc build-essential default-libmysqlclient-dev

1. Initial Settings

Python|Initial Settings

First, choose a suitable name for your application. This name will be used as an identifier in your project domain.

caution
  • Use lowercase letters and only use - as a separator between words.
  • The application name cannot be changed after the application is created.

Python Version

Select the Python version you will use for your project. You can choose from the available list or enter it manually. Please ensure that the Python version you are using is available in the Docker repository (Docker Hub) or other related Docker repositories.

Git Repository URL

Python|Git Repository URL

Enter the URL of your Git repository. Example: https://github.com/username/repo

danger

Make sure that the requirements.txt file is present in your project. If it is not available, you can create it using the command:

pip freeze > requirements.txt

Types of Repository

  • Public: Enter the URL directly.
  • Private: You can connect your private repository to Kubar in two ways:

Connect with Access Token

Connect with SSH Key

After completing this step, select the "Next" option.

2. Advanced Settings (Optional)

Python|Advanced Settings

In this section, you can apply more advanced settings:

Build

Run Command

Kubar uses 'gunicorn' by default to run your application. If your application is not compatible with gunicorn or if you want to use a different command to run your service, you can enter it here.

Port

Specify the port number on which your application will run.

caution
  • After the initial setup, changing the port is not possible.

  • If you entered a command in the command line, make sure your application listens on the address 0.0.0.0 and your desired port.

Resource Scheduling

Disk

Environment Variables

3. Select a Plan

Python|Select Plan

In this step, choose your desired plan. You can select from the available list or configure it manually.

Replicas

Specify the number of replicas (running instances) for your application. This number will affect the performance and availability of your application.

Importance of the Number of Replicas

  • Scalability: Increased processing power with more replicas.
  • High Availability: Maintaining performance in case one instance fails.
  • Load Distribution: Distributing the load among multiple instances.

After selecting your desired plan, choose the Create App option.

4. Project Management

Python|Project Management

In this section, you will have access to project management features:

  • Check project status

  • How to connect to the project

  • Review application resources

  • Number of replicas

  • Manage port

  • Rename Dockerfile (if needed)

    tip

    If your project requires very specific settings, you can create your own custom Dockerfile. For more information, refer to this link.

  • Change run command

  • View and change Git URL

  • Rebuild project from Git

  • Restart project

With these features, you can effectively manage and maintain your project.