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

Redirect route_schedules #4304

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/apache/jormungandr.default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [L,PT]

RewriteCond %{ENV:APACHE_ROUTE_SCHEDULE_TO_GORMUNGANDR} true [NC]
RewriteRule ^/(.*route_schedules.*) http://gormungandr01:80/$1 [P]
ProxyPassReverse / http://gormungandr01:80/

AddOutputFilterByType DEFLATE application/json

CustomLog /var/log/apache2/access.log vhost_combined_timetaken
Expand Down
9 changes: 8 additions & 1 deletion docker/run_jormungandr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ function show_help() {
Usage: ${0##*/} -m monitor-process -r max-requests
-m [0|1] activate monitor-process
-r max-requests before reload for jormungandr worker
-g enable gormungandr for route_schedules API
EOF
}

while getopts "m:r:c:h" opt; do
while getopts "m:r:c:g:h" opt; do
case $opt in
m) monitor_processes=$OPTARG
;;
r) app_max_requests=$OPTARG
;;
c) jormun_cache_items=$OPTARG
;;
g) enable_gormungandr_route_schedules=$OPTARG
;;
h|\?)
show_help
exit 1
Expand Down Expand Up @@ -47,6 +50,10 @@ fi

jormungandr_cache2="name=jormungandr,items=${jormun_cache_items}"

if [[ $enable_gormungandr_route_schedules -eq 1 ]]
then
echo "export APACHE_ROUTE_SCHEDULE_TO_GORMUNGANDR=true" >> /etc/apache2/envvars
fi
# run apache2
service apache2 start
if [ $? == 1 ]
Expand Down
Loading