Don't replace commented DB_HOST on my .env
I lost my commented line for alternative DB host :-( I think it's better to replace active DB_HOST line only.
I think this creates a backup of your .env file before changing it - is that not the case for you? (It might depend on if you're on MacOS or not, due to how sed works, but I'd have to double check!
In any case, sorry about that!
Can you confirm: Does this change only swap out the first instance of DB_HOST it finds?
@fideloper sorry for late reply.
Yes, I can recover from .bak file, so It's not too much problem. But I think there's no need to change even inactive configurations.
Applying to this batch to original .env like below:
DB_HOST=localhost
#DB_HOST=db
BEFORE
DB_HOST=mysql
#DB_HOST=mysql ... also changes inactive configuration
AFTER
DB_HOST=mysql ... change only active configuration
#DB_HOST=db ... keep inactive configuration
Can you confirm: Does this change only swap out the first instance of DB_HOST it finds?
It swap out all lines of active DB_HOST (if exists multiple) as before.