Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile: Run without .env file #38

Open
m3nu opened this issue Mar 14, 2022 · 2 comments
Open

Dockerfile: Run without .env file #38

m3nu opened this issue Mar 14, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@m3nu
Copy link
Contributor

m3nu commented Mar 14, 2022

Looks like Laravel doesn't use all container env vars when a .env file is also present. This .env file is used for APP_KEY which is generated and then stored in .env.

This is bad because it stores state inside the container image, which should be disposable. It's also ugly to copy our env vars to a file. This could cause issues when someone e.g. updates the app URL.

Current workaround in run.sh: https://github.com/m3nu/my-idlers/blob/main/run.sh

So would be good to find a setup where no .env file is needed and all settings come from container env vars. Default values could go into the Dockerfile.

@cp6
Copy link
Owner

cp6 commented Mar 14, 2022

I agree that the .env file is overkill for this project however, at this stage i am not sure of a method to generate/store the APP_KEY that is not .env for those not using docker

@cp6 cp6 added the enhancement New feature or request label Mar 14, 2022
@cp6
Copy link
Owner

cp6 commented Mar 14, 2022

Perhaps php artisan key:generate --show and manually add this generated key into the config/app.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants