I am exploring GAE with nconf and I'm wondering if the following setup is secured after I deploy an App.
What concerns me is are both my "config.dev.json" and "config.prod.json" files deployed despite including them in ".gitignore".
I am unsure what information is passed along to gae (I don't want my config keys exposed) after I do:
$ git add .
$ git commit -m 'Commiting'
$ glcoud app deploy
My Node App structure looks like this:
- /myProject
- /node_modules
- .gitignore
- app.js
- app.yaml
- config.js
- keys.dev.json
- keys.prod.json
- package-lock.json
- package.json
// .gitignore
node_modules
keys.dev.json
keys.prod.json
// config.js:
const nconf = require("nconf");
nconf.argv().env();
if (nconf.get("NODE_ENV") === "production") {
nconf.file("keys.prod.json");
} else {
nconf.file("keys.dev.json");
}
...
Including files in
.gitignore
has no implications whatsoever on deployment on GAE, that file is only used bygit
.If you want to prevent deployment of a file to GAE you need to use the
skip_files
option in yourapp.yaml
file's General settings:Side notes:
--verbosity
option for thegcloud app deploy
command.