Hi guys,
What should and shouldn’t I put in version control? In others words: how usually is Meteor apps .gitignore files?
I saw that /.meteor has a .gitignore that just ignores /.meteor/local and read about ignoring setttings.json file too.
There is already a common pattern in the community?
If I clone a Meteor app, it should run just fine? What about Node & Mongo hosts and ports?
That’s a bit of a problem, most of the time you cannot run a clone without intervention.
Personnaly, i just commit the “packages” file in my .meteor folder.
For repeatable builds, one must definitely commit packages, platforms, release, versions files within the .meteor directory. Otherwise, when cloned, the new copy may have different versions of meteor and packages.
The .meteor folder already contains a .gitignore file that will do the job. I also have this in my .gitignore in the project folder:
settings.json
.idea
Typically my settings.json will contain private keys, and I wouldn’t want those in a repository I don’t fully control. I put the settings.json file on a secure server that Jenkins will scp from right before building. The .idea folder is for WebStorm.
Thanks @sergiotapia, I’ll follow your - and @ffxsam - suggestion to let Meteor do the ignore job, within settings.json + IDE/TextEditor specific folders/files (that is already in global gitignore btw).
My only addition will be a .env/.env.example file to illustrate what should be the environment settings used and expected for the project.
Thank you guys.
Cheers.
EDIT
If using MUP I recommend ignoring mup.json files too, just left a mup.json.example (or something like that) with default settings.