-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Database Error and More environment variable weirdness in docker-compose #578
Comments
FYI - here's what @SinisterCrayon is possibly referring to: #576 (comment) |
Resolved it... realized it was calling for a WORDPRESS_DB_NAME variable that I didn't previously have. Added that (name of "wordpress") and we're back to normal. |
@SinisterCrayon for me, only the
|
@kunalnagar You need to pass those variables as part of the "environment" in your docker-compose;
If you fail to pass any of those it won't work. I think earlier versions were defaulting the NAME which is why it worked for me previously, but now it's expecting the NAME to be passed as well. |
@SinisterCrayon If you see #576 (comment), I have those variables. I tried adding the |
can confirm, my secrets/environment values are not transferred into to the container. i can login to the database within the container using the 'mysql -u user -p' command. The secret files have no new lines, as mentioned in other comments. here is my compose file:
|
This is slightly better via #577, but it is definitely recommended to set values for all associated database configuration. 😅 👍 |
I saw this mentioned in another thread, but in the latest builds my Wordpress site is broken. Seems to be the same issue reported by @kunalnagar My docker-compose file (edited to remove passwords and stuff obviously);
When I look at the wp-config.php I'm getting
root@fa79793a21ce:/var/www/html# cat wp-config.php |grep -i db_name
define( 'DB_NAME', getenv_docker('WORDPRESS_DB_NAME', 'database_name_here') );
Clearly it's not carrying over the environment variables from the compose file. Good thing this site's only personal and not production...
The text was updated successfully, but these errors were encountered: