openfrontier / docker-gerrit

Build a Docker image with the Gerrit code review system
Apache License 2.0
197 stars 116 forks source link

Fix Environment variable HTTPD_LISTENURL is not reflected in gerrit.config. #25

Closed haru closed 5 years ago

haru commented 8 years ago

Hi. Thank you for your great work.

Environment variable HTTPD_LISTENURL is not reflected in gerrit.config because "gerrit init" overwrite httpd.listenUrl value.

I moved set_gerrit_config httpd.listenUrl to after "gerrit init". And it works.

thinkernel commented 8 years ago

Hi there. In my environment HTTPD_LISTENURL is set to proxy-http://*:8080/gerrit and it always works. I checked the latest image and it works, too. Actually httpd.listenUrl is so important for us that if 'gerrit init' can overwrite this value to the default, which is http://*:8080, then our CI system would have never worked from the beginning. So, could you show me the docker run command you used and I may figure out the problem.

michelau commented 8 years ago

It's happening to me as well. I'm wondering if it's because I haven't installed the keystore yet.

docker run \
    -v ~/gerrit-test-data2:/var/gerrit/review_site \
    -e GERRIT_INIT_ARGS='--install-plugin=download-commands' \
    --link gerrit-mysql:db \
    -p 8443:8443 \
    -p 29418:29418 \
    -e WEBURL=https://<redact>:8443 \
    -e HTTPD_LISTEN_URL=https://*:8443 \
    -e DATABASE_TYPE=mysql \
    -e DB_ENV_MYSQL_DB=reviewdb \
    -e DB_ENV_MYSQL_USER=git \
    -e DB_ENV_MYSQL_PASSWORD=<redact> \
    -e SMTP_SERVER=smtp.gmail.com \
    -e SMTP_USER=<redact> \
    -e SMTP_PASS=<redact> \
    -e USER_EMAIL=<redact> \
    -e AUTH_TYPE=OAUTH \
    -e OAUTH_GOOGLE_RESTRICT_DOMAIN=<redact> \
    -e OAUTH_GOOGLE_CLIENT_ID=<redact> \
    -e OAUTH_GOOGLE_CLIENT_SECRET=<redact> \
    -e OAUTH_GOOGLE_LINK_OPENID=true \
    gerrit2
michelau commented 8 years ago

Installing the keystore had no effect.