Create the manifest.json File

The manifest.json file specifies how to launch your application. Optionally, you can include the runtime version and other parameters.

manifest.json Syntax

Syntax

  • runtime

    • majorVersion – (Optional) Major version of the runtime environment. Each language has its own numbering system.

      • For Java SE, use 7, 8, 9, or 10.

      • For Java EE, use 7.

      • For Node.js, use 0.10 , 0.12, 4, 6, or 8.

      • For PHP, use 5.6, 7.0, or 7.1.

      • For Python, use 2.7.13, 3.6.0, 3.6.1.

      • For Ruby, use 2.3.4, 2.4.1.

      • For Go, use 1.7.6, 1.8.3.

      • For .NET, use 1.1.2–runtime or 2.0.0–runtime.

  • type – (Optional) Determines whether an application is public or private:

    • web (the default) – Specifies a public application, which you can access using a public URL, the public REST API, or the command-line interface.

    • worker – Specifies a worker application, which is private and runs in the background. The isClustered parameter should be set to true in some cases. See Worker Applications.

  • command  – (Required except for Java EE and PHP) Launch command to execute after the application has been uploaded.

    Most PHP applications don’t need a launch command. Unless another file is specified in the application URL, the index file opens first, whether the extension is .htm, .html, or .php. See Select the Launch Command.

    For a Java EE web application, the launch command, if present, is ignored.
  • startupTime – (Optional) Maximum time in seconds to wait for the application to start. Allowed values are between 10 and 600. The default is 30. If the application doesn’t start in the time specified, the application is deemed to have failed to start and is terminated. For example, if your application takes two minutes to start, set startupTime to at least 120.

  • shutdownTime – (Optional) Maximum time in seconds to wait for the application to stop. Allowed values are between 0 and 600. The default is 0. This allows the application to close connections and free up resources gracefully. For example, if your application takes two minutes to shut down, set shutdownTime to at least 120.

  • release – (Optional)

    • build – User-specified value of build.

    • commit – User-specified value of commit.

    • version – User-specified application version.

  • notes – (Optional) Comments.

  • mode – (Optional) Restart mode for application instances when the application is restarted. The only allowed option is rolling for a rolling restart. Omit this parameter to be prompted for a rolling or concurrent restart. See Stopping, Starting, and Restarting an Application in Using Oracle Application Container Cloud Service.

  • isClustered – (Optional) Must be set to true for application instances to act as a cluster, with failover capability. See Prepare a Clustered Application for Deployment.

  • home – (Optional) Context root of the application. The value of the home parameter is appended to the application URL.

  • healthcheck – (Optional) Allows you to define a URL for your application that the system uses for health checks. The URL must return an HTTP response of 200 OK to indicate that the application is healthy. This parameter is only available for cloud accounts with Oracle Identity Cloud Service.

    • http-endpoint – Defines the URI that is appended to the application URL to create the health check URL. For example, if the application URL is http://myapp.example.com and the end point is set to {"http-endpoint":"/health"}. Then the health check will test http://myapp.example.com/health.

      Note:

      The default URL used for health checks is the application root. If no value is set for http-endpoint, then the system will use the application root for health checks. The root application URL must return 200 OK for the application to be considered "healthy" by the health check feature.

Example 3-14 Sample manifest.json for a Java application

{
    "runtime": {
        "majorVersion": "7"
    },
    "type": "web",
    "command": "java -jar myapp.jar",
    "startupTime": "120",
    "release": {
        "build": "150520.1154",
        "commit": "d8c2596364d9584050461",
        "version": "15.1.0"
    },
    "notes": "notes related to release",
    "mode": "rolling",
    "home": "/home.jsp",
    "healthCheck": {
      "http-endpoint": "/health"
    }
}