-
Notifications
You must be signed in to change notification settings - Fork 11
No need to rely on fixed container names #41
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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 ? 🥇
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 Report
@@ 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.
|
Thanks for the inline doc @domq : that's perfect ! |
Fixes #32
thanks to Docker's magic