Reputation: 447
My project needs to read several files as resource (krb5.conf, truststore, keytab). they are in project directory. e.g. C:\Users\WorkSpace\MyProject\krb5.conf.
However, when I upload my project to cloud foundry, the app cannot find my resource files when running.
This is my first time deploy app on cloud foundry. Is there anyway to upload resources files like text file, image jpg to cloud foundry with project? so app can read those files when running on cloud foundry
Upvotes: 1
Views: 694
Reputation: 15051
When you cf push
an application, the cli will upload all files under the specified path. By default, the path is the current directory. You can set a custom path with --path
or -p
.
The --path
and -p
argument may also point to zip files or jar files, for Java apps. In that case, the contents of the archive are uploaded.
The only exceptions:
Files listed here.
.cfignore
_darcs
.DS_Store
.git
.gitignore
.hg
manifest.yml
.svn
If you have a .cfignore
file (same syntax as .gitignore
), anything matched is not uploaded.
To troubleshoot issues:
cf ssh
to your app and check if the files exist.$HOME
or /home/vcap/app
which are the root for your application files.Upvotes: 2