Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

No need to rely on fixed container names #41

Merged
merged 2 commits into from
Oct 9, 2017
Merged

No need to rely on fixed container names #41

merged 2 commits into from
Oct 9, 2017

Conversation

domq
Copy link
Member

@domq domq commented Oct 8, 2017

Fixes #32

  • Find containers by com.docker.compose.service label in Travis
  • Find the "mgmt" container by an ad-hoc label for "make exec"
  • Inter-Docker references by host name (e.g. "db") keep working,
    thanks to Docker's magic

Copy link
Contributor

@ebreton ebreton left a comment

Choose a reason for hiding this comment

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

I would gratefully have a link to the doc for the docker labels used in Travis. If you have a better link than mine, go for it, otherwise, just pick your favorite

.travis.yml Outdated
@@ -17,8 +17,8 @@ before_install:

install:
- make up
- docker exec mgmt make -C /srv/$WP_ENV/jahia2wp bootstrap-mgmt
- docker exec $(docker ps -q --filter "label=com.docker.compose.service=mgmt") make -C /srv/$WP_ENV/jahia2wp bootstrap-mgmt
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't find a clear documentation on this.

It is mentionned in the official doc, and on github

Do you have anything better ? It would be nice to have a comment with a link here for the next readers.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed I had a surprisingly hard time finding documentation on the com.docker.compose.* labels. I put what I found, including your second suggestion; kindly review again.

@@ -34,7 +31,8 @@ services:
- "${WP_PORT_HTTPS}:443"

mgmt:
container_name: mgmt
labels:
ch.epfl.jahia2wp.mgmt.env: ${WP_ENV}
Copy link
Contributor

Choose a reason for hiding this comment

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

we are up to the latest standards, aren't we ? 🥇

Dominique Quatravaux added 2 commits October 9, 2017 09:27
Fixes #32

* Find containers by com.docker.compose.service label in Travis
* Find the "mgmt" container by an ad-hoc label for "make exec"
* Inter-Docker references by host name (e.g. "db") keep working,
  thanks to Docker's magic
@codecov
Copy link

codecov bot commented Oct 9, 2017

Codecov Report

Merging #41 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #41   +/-   ##
=======================================
  Coverage   64.22%   64.22%           
=======================================
  Files          11       11           
  Lines         464      464           
=======================================
  Hits          298      298           
  Misses        166      166

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f44c521...4a63420. Read the comment docs.

@ebreton ebreton merged commit 5217cb9 into epfl-si:master Oct 9, 2017
@ebreton
Copy link
Contributor

ebreton commented Oct 9, 2017

Thanks for the inline doc @domq : that's perfect !

ebreton added a commit that referenced this pull request Oct 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants