I have a web application which is built and tested using gradle/gretty and gitlab-ci (with gitlab running on my own server) with a docker image. This is working fine for unit tests.
But now I want users to test the web app in a browser. My idea: Create another gitlab-ci job (which is manually started) with a docker image, which utilizes grettys appStart to start a tomcat instance and leave it runnig, so that users can access it from their browser.
The problem: How can I expose the server inside of the docker image to the outside world? I found hints how to do it, if you run a docker image standalone, but not how to do it when using docker with gitlab-ci.
Or are there better approaches for doing what I try?
My simple gitlab-ci.yml:
runServer:
image: java:8-jdk
script:
- ./gradlew appStart
when: manual