mannyw The same config.php file being placed would throw the error below
That doesn't make sense honestly. Files are just files, if you restored a backup with the right database credentials the community should just work again. I assume something changed, either the database credentials in the config.php or something else. Make sure to test them manually (if you can).
mannyw I also wanted to get advice on setting up a workflow so that an issue like this does not occur again. I understand this is a multifaceted inquiry but I would love to understand what I did wrong and learn from it.
What developers usually do is:
- use
.gitignore
to make sure the config.php
is not committed into vcs
- use
.gitignore
to include the several folders under storage without their contents (first ignore them, then force add empty .gitignore
files from each directory into git)
- use
.gitignore
to exclude the vendor directory
- maybe use
.gitignore
to exclude public/assets
, that's up to you because they also contain avatars
Gitignoring files makes sure they aren't overwritten when you pull changes to production (or locally for that matter).
Here's the .gitignore
from discuss:
public/assets/*.js
public/assets/*.css
public/assets/*.js.map
public/assets/fonts
public/assets/rev-manifest.json
public/assets/avatars/
public/assets/extensions/
storage/
config.php
vendor/