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

feat: Provide Docker option for setting up backend #110

Merged
merged 3 commits into from Jul 14, 2018
Merged

Conversation

tristanoneil
Copy link
Contributor

@tristanoneil tristanoneil commented Jul 3, 2018

🐳✨🐳✨🐳✨🐳✨🐳✨ 🐳✨ 🐳✨ 🐳✨ 🐳✨ 🐳✨ 🐳✨ 🐳✨ 🐳✨ 🐳

Many of the reported issues are caused by minor discrepancies across developers computers. Providing a Docker option should be more full proof in that we're starting with a known quantity (the base image). The commit message has a bit more detail explaining what's changed and why.

@prichey
Copy link

prichey commented Jul 3, 2018

When running through the installation process with docker, I don't get the standard prompts to 1) replace my WP installation and 2) to create a new DB. Were these changes intentional?

@tristanoneil
Copy link
Contributor Author

@prichey It was intentional as I was initially not running the installer with tty but now I am ... I think I'll bring them back.

@tristanoneil tristanoneil force-pushed the docker branch 2 times, most recently from 66a939f to 24b754f Compare July 3, 2018 20:13
@tristanoneil
Copy link
Contributor Author

@prichey it'll ask now πŸ˜„

@tristanoneil tristanoneil force-pushed the docker branch 3 times, most recently from 1c9f10c to 518905f Compare July 3, 2018 20:21
@prichey
Copy link

prichey commented Jul 3, 2018

The postinstall script isn't getting triggered now that I'm just running yarn docker:build && yarn docker:start. From a clean install, what steps are you running to get it set up locally with docker? Do you trigger the postinstall script manually?

@tristanoneil
Copy link
Contributor Author

No need to run postinstall, yarn docker:start runs ./start_docker.sh which runs robo wordpress:setup and assuming that works starts wp server.

@prichey
Copy link

prichey commented Jul 3, 2018

Interesting, it looks like Docker cached the result of running that script. (Terminal output here).

Wonder if it's worth throwing a --no-cache on the docker build step?

@prichey
Copy link

prichey commented Jul 3, 2018

Huh, even with --no-cache I'm still not getting the prompt. Does it work for you locally?

https://gist.github.com/prichey/e8f283000967dfd95944f363066c8159

@tristanoneil
Copy link
Contributor Author

@prichey made one tiny little change and it all broke πŸ˜„. Apparently CMD doesn't like single quotes, who knew. Should work in bbef810.

@prichey
Copy link

prichey commented Jul 3, 2018

Works! LGTM

tristanoneil and others added 3 commits July 13, 2018 15:44
- pass optional --docker flag to wordpress:setup that makes some minor
adjustments to how the setup runs to accommodate Docker. Use localhost
instead of 0.0.0.0 for the db ip since mysql can't connect to 0.0.0.0
within a Docker container. MySQL is installed as part of the Dockerfile
so MySQL doesn't need to be installed during this part of the setup.
- the wordpress server needs to bind to 0.0.0.0 in order for Docker port
binding to work.
- wp needs to be passed --allow-root since in our Docker container we're
running everything as root.
@ginatrapani
Copy link
Member

This is fantastic, thank you so much @tristanoneil!

@ginatrapani ginatrapani merged commit 04d7973 into master Jul 14, 2018
@ginatrapani ginatrapani deleted the docker branch July 14, 2018 14:32
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

Successfully merging this pull request may close these issues.

None yet

3 participants