Working with environments |
Hi all
I've read https://codeigniter.com/user_guide/insta...nning.html and https://codeigniter.com/user_guide/gener...ments.html but I still need help wrapping my head around how to work with environments. Sorry, but I'm fairly new to php and codeigniter. So my setup is CI4 with a local development server (localhost/mysite) and a remote production server (mysite.com). I push my local changes to github where the files are copied & pasted to the webserver automatically. How should I setup the environments? Do I need multiple .env files, one for local and one for production? Should I .gitignore the .env and keep two seperate configurations local and on the production server? Do I have to configure something on the production webserver? And furthermore, does it matter what baseURL is defined in App.php if I overwrite it in the .env-file anyway? Any help is much apreaciated ![]() Regards Tobi
I just found this part of the documentation https://codeigniter.com/user_guide/gener...ation.html where it's advised to .gitignore the .enf file. This is the advice I was looking for.
So I'll configure my setup as follows:
![]() Any comments? Tobias |
Welcome Guest, Not a member yet? Register Sign In |