DiUS / pact_broker-docker

'Dockerised' pact broker
http://pact.io
MIT License
76 stars 102 forks source link

Port different than 80 still not working #55

Closed bluehallu closed 6 years ago

bluehallu commented 6 years ago

Expected behaviour:

I can map the internal port to any external port that I want with docker

Actual behaviour:

Mapping to anything else than 80 causes Rack to refuse the connection

Versions tested:

Latest, 2.11.0-1

Related issues:

https://github.com/DiUS/pact_broker-docker/issues/24 https://github.com/DiUS/pact_broker-docker/pull/17 https://github.com/DiUS/pact_broker-docker/pull/11

bethesque commented 6 years ago

Have you modified the port that nginx is listening on?

I changed the listen from 80 to 8080 in webapp.conf, and set the PACT_BROKER_PORT env var to 8080 (not sure if this was required) and then ran script/test.sh. The test script failed because it was still set to make the request on port 80, but when I went to the browser and loaded localhost:8080, the broker was running fine.

# container/etc/nginx/sites-enabled/webapp.conf

server {
    listen 8080;
    # server_name pact-broker;
    root /home/app/pact_broker/public;

    passenger_enabled on;
    passenger_user app;

    # If this is a Ruby app, specify a Ruby version:
    passenger_ruby /usr/bin/ruby;
}
screen shot 2017-11-18 at 12 30 17 pm
bethesque commented 6 years ago

I'm closing this due to lack of response, but please reopen if it is still an issue. It would be good if you could confirm if this worked or not for future users.