larakube icon indicating copy to clipboard operation
larakube copied to clipboard

App secrets not being loaded by laravel

Open joaogl opened this issue 6 years ago • 1 comments

Hello,

I've been playing around this and actually added a secret for the laravel app settings (.env file), on Laravel 5.7 I'm not being able to use the env settings on the laravel.

If I enter the php-fpm container and run echo $MYSQL_USER I get homestead (correct, is what I passed in the docker variables) but when I run php artisan migrate for example it uses the forge user (which is the default when no variable is found). If I create a .env file it uses that file correctly. having this said, how can I get this to work with the docker environment variables?

joaogl avatar Oct 10 '18 13:10 joaogl

It's possible that individual .env files were not linked to specific containers maybe? I've refactored the code a bit and for local development, I've moved environment variables directly into docker-compose.yml

For Kubernetes deployment I've switched to Helm package manager, as its easier to deploy / upgrade / remove entire application with a single command.

I realize README.md still lacks proper documentation and Helm chart itself could be improved to provide more installation options (Load Balancer or Ingress, other variables), but this is all my free time today.

markhilton avatar Nov 28 '18 00:11 markhilton