Skip to main content

Deploying with Github Repository

Deploying your app to the Morph platform is automated through integration with your Github repository. Deployed apps are secured with user authentication through Morph accounts.
1

Create a Github repository

Create a Github repository.The deployment settings are configured in morph_project.yml.
2

Log in to morph-data.io and connect your Github account

Log in to https://app.morph-data.io/, navigate to the Projects tab and go to the new project creation screen. Follow the on-screen instructions to connect your Github account and select your Github repository.
3

Push your code

When you push code to your Github repository, the build will start automatically. Once the build is complete, your app URL will become active. The deployed app automatically includes user authentication through Morph accounts. To share with others, first invite them as users before sharing the URL.

Deploying with Docker and Moroh CLI

This method is not recommended.
The following steps require the morph command. If it is not installed, run the command pip install morph-data to install it.
Docker is required to build the Morph application; if you do not have Docker installed, please install it from the official Docker website.
1

Set up your project

  1. Navigate to the root directory of your project:
    Shell
  2. Edit the morph_project.yml file in the root directory to set the project_id:
    YAML
    • The profile corresponds to the section in ~/.morph/credentials. Typically, default is sufficient, but modify it if you have multiple credentials.
    • The package_manager is set to the selected package manager when the project was created. Normally, you do not need to change this. The morph deploy command builds based on this setting.
      • If package_manager=pip is specified, edit the requirements.txt file in the root directory to specify the packages to install in the deployment environment. Otherwise, requirements.txt is automatically generated during the build process.
2

Set up the morph CLI

Run the following command to configure the API key in ~/.morph/credentials:
Shell
3

Configure Python packages for the cloud environment

The packages specified in pyproject.toml will be installed in the deployment environment. Make sure to run the poetry update command before deployment to update the poetry.lock file to the latest state.
The packages specified in pyproject.toml will be installed in the deployment environment. Make sure to run the uv sync command before deployment to update the uv.lock file to the latest state.
The packages specified in requirements.txt will be installed in the deployment environment.Run the following command to generate requirements.txt:
Shell
4

Deploy to the cloud

Run the following command to deploy to the cloud:
Shell
  • To disable Docker cache, use:
Shell
After deployment, log in to https://app.morph-data.io/, and check the results.