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

Better examples to show Compose file structure, expand/collapse accordion #3967

Merged
merged 8 commits into from
Jul 28, 2017
Merged

Better examples to show Compose file structure, expand/collapse accordion #3967

merged 8 commits into from
Jul 28, 2017

Conversation

londoncalling
Copy link
Contributor

What's changed

  • added more context to examples for build and volume sub-options to service
  • added back in example Compose file at the top of the page to provide overall context
  • fixed a link

Related

Fixes #1349
Fixes #3955

Reviewers fyi

@shin- @MicheleMannino @Capricorn1

Signed-off-by: Victoria Bialas victoria.bialas@docker.com

<div class="panel-heading" role="tab" id="headingThree">
<h5 class="panel-title" id="collapsible-group-item-3"> <a class="" role="button" data-toggle="collapse" data-parent="#accordion" data-target="#collapseThree" aria-expanded="true" aria-controls="collapseThree"> Example Compose file version 3 </a> </h5>
</div>
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree" aria-expanded="true">
Copy link
Contributor

Choose a reason for hiding this comment

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

💥 sweet!
Not a major issue, but the compose file includes 6 spaces, so when I copy this sample to my text editor I'll have to remove those spaces to make this sample work.
Try to remove the leading spaces in lines 58-146, that might do the trick

Copy link
Contributor Author

@londoncalling londoncalling Jul 26, 2017

Choose a reason for hiding this comment

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

@joaofnfernandes great suggestion, have a look now, should be good.

FYI, @dnephin @shin- I'm going to look into the possibility of pulling this file from the voting app sample source on GitHub in the long term.

Copy link

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

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

Tested locally.

placement:
constraints: [node.role == manager]

networks:
Copy link
Contributor

Choose a reason for hiding this comment

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

Almost there. Network and volumes need to be aligned with services, so you need to remove 2 spaces from lines 141-146

@londoncalling londoncalling changed the title better examples to show Compose file structure WIP: better examples to show Compose file structure Jul 26, 2017
Victoria Bialas added 5 commits July 27, 2017 17:08
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
@londoncalling
Copy link
Contributor Author

@mstanleyjones @joaofnfernandes @johndmulhausen @shin- Please take a look if you get a chance. Accordion menu implemented for Compose sample config file, and instructions added in test.md. We can iterate and refine this more later, but I think it's quite workable for now.

Victoria Bialas added 2 commits July 27, 2017 21:56
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
…and content

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
@londoncalling londoncalling changed the title WIP: better examples to show Compose file structure Better examples to show Compose file structure, expand/collapse accordion Jul 28, 2017
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Copy link

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

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

LGTM, one tiny nit.

}

.panel-heading:hover{
background: #fafdfe;

Choose a reason for hiding this comment

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

Can you please use background-color? background is a hybrid which can take a color and an image together. This is a nit but it's more correct.

@londoncalling
Copy link
Contributor Author

LGTM with additional fixes to polish up the accordions, test/fix for mobile, and full explanation in test.md. Original goal was Compose file improvements per user feedback. Added accordion to support long code/config samples.

@londoncalling londoncalling reopened this Jul 28, 2017
@londoncalling londoncalling merged commit eb25815 into docker:master Jul 28, 2017
@londoncalling londoncalling deleted the compose-file-structure branch July 29, 2017 00:52
shin- pushed a commit to shin-/docker.github.io that referenced this pull request Aug 19, 2017
…dion (docker#3967)

* better examples to show Compose file structure

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* cleaned up leading spaces in Compose file example

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* cleaned up leading spaces, added a test file

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* expand/collapse accordion full implementation, explanation in test.md

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* delete temporary test file from PR

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* fix accordion to work on mobile (cursor style)

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* verified fix for mobile worked, added same to test.md, updated notes and content

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* Clarifed details on test page, fixed references for FontAwesome icons

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
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.

Change link referring to Docker Swarms Provide parent for each key in the compose file
3 participants