Docs Menu

Deploy Changes with Realm CLI

On this page

  • Overview
  • Prerequisites
  • Procedure
  • Log In to MongoDB Cloud
  • Pull the Latest Version of Your App
  • Update Your Application
  • Deploy the Updated App

You can deploy changes to your App with Realm CLI by importing an application directory with configuration files that define the updated app.

Warning

If you're using Automated GitHub Deploy, do not update your App configuration via the Realm CLI. Instead, push your changes to the linked GitHub repository.

1

To configure your app with realm-cli, you must log in to MongoDB Cloud using an API key scoped to the organization or project that contains the app.

realm-cli login --api-key="<MongoDB Cloud Public API Key>" --private-api-key="<MongoDB Cloud Private API Key>"
2

You'll need a local copy of your application's configuration files. To pull a local copy of the latest version of your app, run the following:

realm-cli pull --remote="<Your App ID>"
Tip

You can also download a copy of your application's configuration files by following the documentation to export an App.

3

Add, delete, and modify configuration files for your application's various components.

4

Once you've updated your app's configuration files, you can push them to your remote app. Realm CLI immediately deploys the updated configurations on push.

realm-cli push --remote="<Your App ID>"
Tip

If you have deployment drafts enabled, you'll be prompted to review and confirm your changes in the terminal. When you approve, Realm CLI immediately deploys the updated configurations.

←  Deploy from the Atlas App Services UIDeploy Changes with App Services API →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.