Reputation: 24616
I'm deploying a java application with this manifest.yml:
applications:
- name: myapp
instances: 1
path: target/myapp-with-dependencies.jar
...
I would like to add some additional resources to the cloud foundry instance, but I don't want to bundle those resources in the jar file.
I haven't found any documentation to suggest that this is possible. Is there a way to do this?
Upvotes: 2
Views: 461
Reputation: 592
There is no way to add additional artifacts without including them in the application artifact itself. Cloud Foundry expects "applications" to be pushed. For Java, this means a JAR, WAR, a directory of Groovy files, etc. For other languages, it might be a directory full of source files. In either case, what is pushed is an application and any additional files beyond executable code are part of that application (e.g. a KeyStore
in META-INF/
, config file in directory).
In general, Cloud Foundry optimizes for 12 Factor applications which encourage the use of environment variables for configuration. Where possible, this is the best way to configure your application. In the case where you need an artifact that cannot be represented as an environment variable (e.g. an SSL cert) you should include that as part of the application artifact you push.
Upvotes: 4