Closed wkelton closed 6 months ago
Turns out
inject.sh
is only doingsed
. APP_FORCE_HTTPS (and maybe APP_URL) were not being set in that file because they were never there.
That's a good point. I'm really surprised it hasn't come up earlier.
A bigger question: why do environment variables need to be in that file instead of being, you know, in the environment?
That I can't help with. Laravel's documentation claims they should, but as you can see they do not.
I have been running Lychee for a long time (probably about 4 to 5 years). I really struggled through this recent upgrade. Most of the problems I faced have already been discussed and / or resolved in other issues.
APP_FORCE_HTTPS (maybe APP_URL) needing to be set was my problem. Setting APP_FORCE_HTTPS=true in my docker compose file did not fix things (this resulted in me going down many rabbit holes related to other settings talked about in other issues - wasted many hours).
I forgot that there is an /conf/.env file in a volume. I didn't realize that the environment variables set in my compose file were being written to this file. But, that wasn't happening. Turns out
inject.sh
is only doingsed
. APP_FORCE_HTTPS (and maybe APP_URL) were not being set in that file because they were never there.I suggest for this project to do the following:
sed
, if it did not replace anything, append the new variable to the end of the file.sed
did not replace anything.A bigger question: why do environment variables need to be in that file instead of being, you know, in the environment?