Add a Manifest File

Page last updated:

Page last updated:

It’s tedious to keep having to specify the app name and other variables each time we push our app. That’s where a manifest.yml file comes in handy. It holds all the configuration for our app so that Cloud Foundry will know what to do with it. Create a manifest.yml file in the root folder of your app and add the following content (don’t forget to replace the “my-java-app” with your creative appname and hostname again):

---
applications:
- name: my-java-app
  memory: 1G
  instances: 1
  buildpack: java_buildpack
  path: build/libs/cf-sample-app-java-1.0.0.jar

  routes:
  - route: my-random-hostname.scapp.io

  services:
  - my-redis-service

The file tells Cloud Foundry that this is an application with the name my-java-app and the specifications made above. This means that from now on, you’ll be able to push your App with the simple command:

$ cf push

You can define many more variables in a manifest file. To find more information about application manifests, go to the About Apps part of this documentation.

I’ve added a manifest
View the source for this page in GitHub