Deploy App

Custom apps

A tutorial for deploying a custom app to Nextmv Cloud.

With custom apps you can customize all parts of the model and therefore completely adapt the service to your unique business needs. There are a variety of community apps available that are a great way to get started in a particular problem domain (e.g. vehicle routing, scheduling), in case you don't want to start from scratch.

Custom apps are supported for these languages:

  • Go
  • Python
  • Java

The code of the app can come from a Nextmv template, or it can be your own custom code.

The most important file that needs to be present in the root of the project is the app.yaml manifest. Here are some example app.yaml files for different languages.

# This manifest holds the information the app needs to run on the Nextmv Cloud.
type: sdk
features:
  - sdk
  - mip-highs # Replace if using a different solver provider in your app.
Copy

Please read the section on execution environment for more details.

For a custom app you need to:

  1. Create the app
  2. Deploy (push code to the app)

Create the app

To create a custom app, define the desired app ID and name. After, you can use one of the following interfaces:

  • Console. Go to Console, Apps section. Add a new app from All or Custom tabs. Fill in the fields.

    New app

  • Nextmv CLI. Anywhere on your machine, run the following command:

    nextmv app create \
        --app-id $APP_ID \
        --name $APP_ID \
        --description "An optional description"
    
    Copy

Deploy

Deploying an app means pushing code to it. You must use the Nextmv CLI. Standing in the root of your project run the following command:

nextmv app push --app-id $APP_ID
Copy

This command is used again whenever new code is deployed to the app.

If the app.yaml manifest specifies a pre-push command, it will be executed with bash before the app is pushed to the Nextmv Cloud. This command can be used to compile a binary or run tests.

๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰ The app is ready to be used.

Delete a custom app

Delete a custom app using the following interfaces:

  • Nextmv CLI. Anywhere on your machine, run the following command:

    nextmv app delete \
        --app-id $APP_ID
    
    Copy
  • Cloud API. Make sure your NEXTMV_API_KEY is exported as an environment variable. The API uses Bearer Authentication.

    DELETEhttps://api.cloud.nextmv.io/v1/applications/{application_id}

    Delete application.

    Delete application, specified by application ID.

    curl -L -X DELETE \
        "https://api.cloud.nextmv.io/v1/applications/$APP_ID" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer $NEXTMV_API_KEY"
    
    Copy

Page last updated

Go to on-page nav menu