Skip to content

Commit

Permalink
#45 Replace the variable in nginx root path redirect to be a string r…
Browse files Browse the repository at this point in the history
…eplaced by during entrypoint
  • Loading branch information
root committed May 4, 2016
1 parent a0c4df8 commit 0391b44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions 4-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ curl -HContent-Type:application/json -vXPUT "http://$T_ADMIN:$T_PASS@$T_COUCH_HO
cd /tangerine-server/editor/app
sed "s#INSERT_HOST_NAME#"$T_HOST_NAME"#g" _docs/configuration.template | sed "s#INSERT_TREE_URL#"$T_TREE_URL"#g" | sed "s#INSERT_PROTOCOL#"$T_PROTOCOL"#g" > _docs/configuration.json
sed "s#INSERT_HOST_NAME#"$T_HOST_NAME"#g" _docs/settings.template | sed "s#INSERT_PROTOCOL#"$T_PROTOCOL"#g" > _docs/settings.json
sed -i -e "s#INSERT_PROTOCOL#"$T_PROTOCOL"#g" /etc/nginx/sites-available/tangerine.conf
service nginx reload

couchapp push
cd /tangerine-server/robbert/couchapp
couchapp push
Expand Down
4 changes: 2 additions & 2 deletions tangerine.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ server {

# redirect to the real site
location /index.html {
return 301 $scheme://$host/db/tangerine/_design/ojai/index.html;
return 301 INSERT_PROTOCOL://$host/db/tangerine/_design/ojai/index.html;
}

# Make site accessible from http://localhost/
Expand Down Expand Up @@ -70,4 +70,4 @@ server {
proxy_connect_timeout 75s;
}

}
}

0 comments on commit 0391b44

Please sign in to comment.