Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump jenkins version + add missing variables for nginx #496

Open
wants to merge 5 commits into
base: 4.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docker/nginx/geonode.conf.envsubst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down