Skip to content

Convert "wordpress" to use "docker stack deploy" as an initial "stack" foray #913

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

Merged
merged 1 commit into from
May 19, 2017

Conversation

tianon
Copy link
Member

@tianon tianon commented May 19, 2017

Closes #912

Here's an example of what this generates: (and that "Try in PWD" link should actually work!)

... via docker stack deploy or docker-compose

Example stack.yml for wordpress:

version: '3.1'

services:

  wordpress:
    image: wordpress
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_PASSWORD: example

  mysql:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: example

Try in PWD

Run docker stack deploy -c stack.yml wordpress (or docker-compose -f stack.yml up), wait for it to initialize completely, and visit http://swarm-ip:8080, http://localhost:8080 or http://host-ip:8080 (as appropriate).

@tianon
Copy link
Member Author

tianon commented May 19, 2017

cc @marcosnils

This takes our existing docker-compose.yml scaffolding and converts it to use docker stack deploy and thus gives us "Try in PWD" in a standard way. 👍

(I've only converted wordpress/docker-compose.yml/wordpress/content.md so far as an initial example.)

@marcosnils
Copy link
Contributor

LGTM!.

@yosifkit yosifkit merged commit 4c96249 into docker-library:master May 19, 2017
@yosifkit yosifkit deleted the stack branch May 19, 2017 22:50
@marcosnils
Copy link
Contributor

Thx guys, I'll send a PR to add the currents stacks from the PWD stacks repo here. How does that sound?

@tianon
Copy link
Member Author

tianon commented May 19, 2017

As long as they don't refer to any non-official images (https://github.com/docker-library/official-images/blob/b16d43ab480ef45ca309ce3dec192e12e94344ac/README.md#repeatability), that sounds like an OK place to start!

We'll need to update REPO/content.md for each too, so starting with the ones that already have a docker-compose.yml might be an easier bit of low-hanging fruit. 😄

@marcosnils
Copy link
Contributor

@tianon got it. Sad that non-official images can't be used, as for tools like mysql / redis / mongo / etc I found super useful to add a "GUI" container so people can play with it easier. But I understand what you mean and it totally makes sense.

On a different subject, do you also maintain the docker store readme files?. Is there a way we could reach there as well?.

@yosifkit
Copy link
Member

We don't directly control them but they should eventually get the changes we push to the Docker Hub.

@tianon
Copy link
Member Author

tianon commented May 22, 2017

For mysql (and derivatives), we've got adminer, which works decently well in my experience (and is super lightweight).

@marcosnils
Copy link
Contributor

marcosnils commented May 22, 2017

@tianon thx for the adminer tip. I'll try to change our stacks to use that instead.

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.

3 participants