diff --git a/.env.sample b/.env.sample index 3e8f5b9e..f0e284c5 100644 --- a/.env.sample +++ b/.env.sample @@ -59,7 +59,8 @@ HAYSTACK_SEARCH_RESULTS_PER_PAGE=200 # CI/CD Server # ################# JENKINS_HTTP_PORT=9080 -JENKINS_HTTPS_PORT=9443 +# Since Jenkins 2.339, you'll also need the --httpsKeyStore option for https to work +#JENKINS_HTTPS_PORT=9443 # ################# # nginx diff --git a/docker-compose.yml b/docker-compose.yml index 9de1e66b..bb677fcb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,8 @@ services: - HTTP_PORT=${HTTP_PORT} - LETSENCRYPT_MODE=${LETSENCRYPT_MODE} - RESOLVER=127.0.0.11 + - JENKINS_HTTP_PORT=${JENKINS_HTTP_PORT} + #- JENKINS_HTTPS_PORT=${JENKINS_HTTPS_PORT} ports: - "${HTTP_PORT}:80" - "${HTTPS_PORT}:443" @@ -152,20 +154,21 @@ services: restart: on-failure jenkins: - image: jenkins/jenkins:2.164-jdk11 + image: jenkins/jenkins:2.429-jdk17 container_name: jenkins4${COMPOSE_PROJECT_NAME} user: jenkins ports: - - '${JENKINS_HTTP_PORT}:${JENKINS_HTTP_PORT}' - - '${JENKINS_HTTPS_PORT}:${JENKINS_HTTPS_PORT}' - - '50000:50000' + - "${JENKINS_HTTP_PORT}:${JENKINS_HTTP_PORT}" + #- "${JENKINS_HTTPS_PORT}:${JENKINS_HTTPS_PORT}" + - "50000:50000" # network_mode: "host" volumes: - jenkins_data:/var/jenkins_home - backup-restore:/backup_restore - data:/data environment: - - 'JENKINS_OPTS=--httpPort=${JENKINS_HTTP_PORT} --httpsPort=${JENKINS_HTTPS_PORT} --prefix=/jenkins' + - "JENKINS_OPTS=--httpPort=${JENKINS_HTTP_PORT} --prefix=/jenkins" + #- "JENKINS_OPTS=--httpPort=${JENKINS_HTTP_PORT} --httpsPort=${JENKINS_HTTPS_PORT} --httpsKeyStore=${} --httpsKeyStorePassword=${} --prefix=/jenkins" restart: on-failure volumes: diff --git a/docker/nginx/geonode.conf.envsubst b/docker/nginx/geonode.conf.envsubst index 2131d10f..cd4c114a 100644 --- a/docker/nginx/geonode.conf.envsubst +++ b/docker/nginx/geonode.conf.envsubst @@ -56,7 +56,7 @@ location /jenkins { # Using a variable is a trick to let Nginx start even if upstream host is not up yet # (see https://sandro-keil.de/blog/2017/07/24/let-nginx-start-if-upstream-host-is-unavailable-or-down/) set $upstream jenkins:$JENKINS_HTTP_PORT; - # set $upstream $HTTP_HOST$HTTPS_HOST:$JENKINS_HTTP_PORT; + # set $upstream $HTTPS_HOST:$JENKINS_HTTPS_PORT; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr;