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

Create bin/* files #4

Merged
merged 3 commits into from
Jul 13, 2017
Merged

Create bin/* files #4

merged 3 commits into from
Jul 13, 2017

Conversation

mallorydxw
Copy link
Contributor

No description provided.

Copy link
Contributor

@RobjS RobjS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm slightly in two minds about this now. It means that individual WordPress projects can be self-contained (aside from the docker-compose,whippet and git dependencies), but what happens if we want to amend/add new .bin/ scripts? We'd have to do that on a project-by-project basis.

And ideally it'd be good if internal.sh always looks the same, with the project-by-project differences being contained in a .yml file. But that's a bigger change.

These are more points for discussion than firm requests for changes though.

@RobjS
Copy link
Contributor

RobjS commented Jul 12, 2017

This does something along the lines of what we might want for taking theme/plugin activation details from a .yml file: https://github.com/philcook/squick

@mallorydxw mallorydxw changed the title (WIP) Create bin/* files Create bin/* files Jul 12, 2017
bin/wpc_init Outdated

docker-compose up -d
`dirname $0`/../setup/external.sh
docker-compose exec wordpress /usr/src/app/setup/internal.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm finding this doesn't always work first time through, depending on how long external.sh takes to run. The mysql container takes quite a while to get fully running and connected, so that can result in the internal.sh script erroring out because it can't connect to the db. But if you run setup.sh again straight afterwards, it works.

See: docker-library/mysql#81

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just checking whether mysql is accepting connections on port 3306 doesn't seem to be enough - even then it can still fail. Grr.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Perhaps we should leave out the docker-compose up -d line, and ask users to execute it manually (and warn them that ./bin/setup might fail if MySQL isn't running yet)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might be the easiest way to solve it for now - docker-compose up is how users would be starting a site generally, so it wouldn't be inconsistent to ask them to do it the first time they set up the site, just with an extra step afterwards.

@RobjS RobjS merged commit 63bdf95 into master Jul 13, 2017
@RobjS RobjS deleted the feature/bin branch July 13, 2017 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants