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

.env file breaks with latest docker #17

Open
k1sul1 opened this issue Apr 14, 2019 · 1 comment
Open

.env file breaks with latest docker #17

k1sul1 opened this issue Apr 14, 2019 · 1 comment

Comments

@k1sul1
Copy link
Contributor

k1sul1 commented Apr 14, 2019

I'm using Arch, so I'm always using the latest versions of everything. Last week, after updating, all of my projects using this stopped working.

After a brief debugging session, I found this: docker/compose#6511

Apparently, using export in .env files was never supported by Docker, and now it's broken. The fix seemed self-explanatory, remove all occurrences of export from the .env file, which allowed the containers to boot.

After that I was stuck in this screen:
image

I did some more debugging, and found out that parse_url fails in config/wp-config.php, because the value it tried to parse looked like this: mysql://wordpress:password@$DATABASE_HOST:$DATABASE_PORT/wordpress

I'm guessing replace stopped working after removing the exports from the .env file. I got everything running again by rewriting the DATABASE_URL & REDIS_URL variables to these:

DATABASE_URL=mysql://wordpress:password@mysql:3306/wordpress
REDIS_URL=redis://redis:6379
@HansUXdev
Copy link

oh so this is why it worked fine in local development and errors out when you deploy to heroku?

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

No branches or pull requests

2 participants