From d1d354971ce7ef1338046a2bd04151398ebaf5a7 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 4 Mar 2023 23:12:11 +0100 Subject: [PATCH] fix ports --- conf/gitlab.13.rb | 4 ++-- conf/gitlab.rb | 4 ++-- scripts/change_url | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- upgrade-versions.sh | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/conf/gitlab.13.rb b/conf/gitlab.13.rb index 53dbd7d..45a5f65 100644 --- a/conf/gitlab.13.rb +++ b/conf/gitlab.13.rb @@ -1010,7 +1010,7 @@ puma['max_threads'] = __PUMA_MAX_THREADS__ ### Advanced settings # puma['listen'] = '127.0.0.1' -puma['port'] = __PUMA_PORT__ +puma['port'] = __PORT_PUMA__ # puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket' # puma['somaxconn'] = 1024 @@ -1066,7 +1066,7 @@ puma['port'] = __PUMA_PORT__ # sidekiq['metrics_enabled'] = true # sidekiq['exporter_log_enabled'] = false # sidekiq['listen_address'] = "localhost" -sidekiq['listen_port'] = __SIDEKIQ_PORT__ +sidekiq['listen_port'] = __PORT_SIDEKIQ__ ################################################################################ ## gitlab-shell diff --git a/conf/gitlab.rb b/conf/gitlab.rb index 479c2b1..044fd00 100644 --- a/conf/gitlab.rb +++ b/conf/gitlab.rb @@ -1058,7 +1058,7 @@ puma['max_threads'] = __PUMA_MAX_THREADS__ ### Advanced settings # puma['listen'] = '127.0.0.1' -puma['port'] = __PUMA_PORT__ +puma['port'] = __PORT_PUMA__ # puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket' # puma['somaxconn'] = 1024 @@ -1132,7 +1132,7 @@ puma['port'] = __PUMA_PORT__ # sidekiq['exporter_tls_cert_path'] = "" # sidekiq['exporter_tls_key_path'] = "" # sidekiq['listen_address'] = "localhost" -sidekiq['listen_port'] = __SIDEKIQ_PORT__ +sidekiq['listen_port'] = __PORT_SIDEKIQ__ ##! Specifies where health-check endpoints should be made available for Sidekiq processes. ##! Defaults to the same settings as for Prometheus metrics (see above). diff --git a/scripts/change_url b/scripts/change_url index 1bdcb33..8dbe772 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -64,7 +64,7 @@ gitlab-ctl reconfigure #================================================= ynh_script_progression --message="Waiting for GitLab..." --weight=15 -ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$puma_port" --timeout=300 +ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$port_puma" --timeout=300 #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index e9ed661..cb6fa79 100644 --- a/scripts/install +++ b/scripts/install @@ -190,7 +190,7 @@ ynh_systemd_action --action=reload --service_name=nginx #================================================= ynh_script_progression --message="Restarting GitLab..." --weight=15 -ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$puma_port" --timeout=300 +ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$port_puma" --timeout=300 #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 877a895..7dfe258 100644 --- a/scripts/restore +++ b/scripts/restore @@ -102,7 +102,7 @@ yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/applica #================================================= ynh_script_progression --message="Waiting for GitLab..." --weight=14 -ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$puma_port" --timeout=300 +ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$port_puma" --timeout=300 #================================================= # CHECK THE RESTORED DATA diff --git a/scripts/upgrade b/scripts/upgrade index 8a0df5b..aee1a30 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -309,7 +309,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Restarting GitLab..." --weight=15 - ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$puma_port" --timeout=300 + ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on http://127.0.0.1:$port_puma" --timeout=300 fi #================================================= diff --git a/upgrade-versions.sh b/upgrade-versions.sh index ff7b262..62fa5ff 100755 --- a/upgrade-versions.sh +++ b/upgrade-versions.sh @@ -138,10 +138,10 @@ EOS" sed -i "s/# puma\['worker_processes'\] = .*/puma['worker_processes'] = __PUMA_WORKER_PROCESSES__/" $conf_file sed -i "s/# puma\['min_threads'\] = .*/puma['min_threads'] = __PUMA_MIN_THREADS__/" $conf_file sed -i "s/# puma\['max_threads'\] = .*/puma['max_threads'] = __PUMA_MAX_THREADS__/" $conf_file - sed -i "s/# puma\['port'\] = .*/puma['port'] = __PUMA_PORT__/" $conf_file + sed -i "s/# puma\['port'\] = .*/puma['port'] = __PORT_PUMA__/" $conf_file # Change sidekiq settings - sed -i "s/# sidekiq\['listen_port'\] = .*/sidekiq['listen_port'] = __SIDEKIQ_PORT__/" $conf_file + sed -i "s/# sidekiq\['listen_port'\] = .*/sidekiq['listen_port'] = __PORT_SIDEKIQ__/" $conf_file # Change nginx settings sed -i "s/# nginx\['client_max_body_size'\] = .*/nginx['client_max_body_size'] = '__CLIENT_MAX_BODY_SIZE__'/" $conf_file