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.

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
    cd /path/to/your-project
    
  2. Edit the morph_project.yml file in the root directory to set the project_id:
    YAML
    # Profile Section in `~/.morph/credentials`
    profile: default
    
    # Project ID
    project_id: [YOUR_PROJECT_ID]
    
    # Python Package Manager
    package_manager: pip
    
    -- omitted --
    
    • 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
morph config
3

Configure Python packages for the cloud environment

4

Deploy to the cloud

Run the following command to deploy to the cloud:

Shell
morph deploy
  • To disable Docker cache, use:
Shell
morph deploy --no-cache

After deployment, log in to https://app.morph-data.io/, and check the results.