-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Spin deploy is not using the correct environment file #146
Comments
This could be a limitation in WordPress. With Laravel, we set the This is something with WordPress that would take some logic to ensure it loads the correct environment file. |
Thanks for your reply. Okay I see. So it will always put all environment files into the container. I thought the |
@jaydrogers To understand it correctly, when is the |
I think we may have discussed this in Discord. Just in case we didn't, Laravel is the one who listens to Then Laravel looks for the file of This logic would have to be developed on your own or incorporated into WordPress somehow. Closing this issue since it's not an issue with Spin, but feel free to ask more questions if you need anything else |
Thanks for your response. My question kind of was how My logic for using the correct |
Current Behavior
I currently have in my wordpress project (spin template) a
.env
file for my local environment and a.env.production
file for my production deploy.When I run
spin deploy production
I noticed that my database-user from the.env
-file is used to try to connect to my database container on my server. Although I get access denied because my database-container used the.env.production
-file information for the setup.After replacing the values in the
.env
-file with the values from the.env.production
and running aspin deploy production
again the connection to the dabase works.Expected Behavior
The
.env.production
-values are used for connecting to the container on the server.Steps To Reproduce
spin new schnetzi/spin-template-wordpress wordpress-problem
).env
-file for a local setup and a.env.production
-file with different values for the production deployspin deploy production
Environment
Anything else?
I am currently using a Google Cloud server.
I also tried to start over with the server but it still didin't work. Moving the env-variables to the
.env
file solved it though.The text was updated successfully, but these errors were encountered: