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-random-hostname” with your creative hostname again):

---
applications:
- name: my-go-app
  memory: 64M
  env:
    GOPACKAGENAME: github.com/swisscom/cf-sample-app-go
  routes:
    - route: my-random-hostname.scapp.io

  services:
  - my-mongodb

The file tells Cloud Foundry that this is an application with the name my-go-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