Skip to content

Commit

Permalink
Merge pull request #74 from manics/dynamic-ports
Browse files Browse the repository at this point in the history
Don't hard-code ports
  • Loading branch information
sbesson authored Sep 19, 2017
2 parents 908c2d8 + acacb40 commit c847770
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ testintegration:
extra_hosts:
- "testintegration:127.0.0.1"
ports:
- "14064:14064"
- "14063:14063"
- "14064"
- "14063"

omero:
extends:
Expand All @@ -55,8 +55,8 @@ omero:
# - JENKINS_USERNAME=${JENKINS_USERNAME}
# - JENKINS_PASSWORD=${JENKINS_PASSWORD}
ports:
- "4064:4064"
- "4063:4063"
- "4064"
- "4063"

web:
extends:
Expand Down Expand Up @@ -96,8 +96,8 @@ nginx:
# - JENKINS_USERNAME=${JENKINS_USERNAME}
# - JENKINS_PASSWORD=${JENKINS_PASSWORD}
ports:
- "80:80"
- "443:443"
- "80"
- "443"

nginxjenkins:
image: nginx:1.10
Expand All @@ -107,7 +107,7 @@ nginxjenkins:
- ./jenkins/conf.d:/etc/nginx/conf.d
- ./jenkins/sslcert:/etc/nginx/ssl
ports:
- "8443:443"
- "443"
redis:
image: redis

Expand All @@ -121,7 +121,7 @@ seleniumhub:
# volumes:
# - /dev/urandom:/dev/random
ports:
- "4444:4444"
- "4444"
seleniumfirefox:
image: selenium/node-firefox:3.0.0-dubnium
links:
Expand Down
5 changes: 3 additions & 2 deletions runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ do
done


curl -k -I https://localhost:8443
JENKINS_PORT=$(docker-compose port nginxjenkins 443 | cut -d: -f2)
curl -k -I https://localhost:$JENKINS_PORT

STATUS=`curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:8443`
STATUS=$(curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:$JENKINS_PORT)

if [ ! "200" == "$STATUS" ]; then
exit 1
Expand Down

0 comments on commit c847770

Please sign in to comment.