Deploy
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.
Create a Github repository
Create a Github repository.
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.
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.
Set up your project
- Navigate to the root directory of your project:
Shell
- Edit the
morph_project.yml
file in the root directory to set theproject_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. Themorph deploy
command builds based on this setting.- If
package_manager=pip
is specified, edit therequirements.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.
- If
- The
Set up the morph CLI
Run the following command to configure the API key in ~/.morph/credentials
:
Configure Python packages for the cloud environment
Deploy to the cloud
Run the following command to deploy to the cloud:
- To disable Docker cache, use:
After deployment, log in to https://app.morph-data.io/, and check the results.