Skip to content

Commit

Permalink
Merge pull request #4304 from hove-io/redirect_route_schedules
Browse files Browse the repository at this point in the history
Redirect route_schedules
  • Loading branch information
azime authored Sep 20, 2024
2 parents d9fb1fb + 3dfb0eb commit 627a078
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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:GORMUNGANDR_URL} ^[a-zA-Z].* [NC]
RewriteRule ^/(.*route_schedules.*) %{ENV:GORMUNGANDR_URL}/$1 [P]
ProxyPassReverse / %{ENV:GORMUNGANDR_URL}/

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 Optional: gormungandr url for route_schedules API (Example: http://gormungandr)
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) gormungandr_url=$OPTARG
;;
h|\?)
show_help
exit 1
Expand Down Expand Up @@ -47,6 +50,10 @@ fi

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

if [[ ! -z $gormungandr_url ]]
then
echo "export GORMUNGANDR_URL=$gormungandr_url" >> /etc/apache2/envvars
fi
# run apache2
service apache2 start
if [ $? == 1 ]
Expand Down

0 comments on commit 627a078

Please sign in to comment.