Skip to content

Commit

Permalink
Merge pull request #156 from mdavis332/fix/custom_path
Browse files Browse the repository at this point in the history
add wtforms email valid dep and fix custom path
  • Loading branch information
JesseBowling authored May 11, 2020
2 parents f0309e9 + a191f6a commit f909972
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ hpfeeds-threatstream==1.0
pygal==1.7.0
GeoIP==1.3.2
validators>=0.12.6
wtforms[email]==2.3.1
7 changes: 4 additions & 3 deletions uwsgi.run
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,17 @@ make_logdir () {

generate_nginx_config () {
cd /opt
export server_base_url=$(awk '/SERVER_BASE_URL/ {print $3}' /opt/config.py | sed "s/'//g")
python3 generate_nginx_standalone.py --server-base-url ${server_base_url} --output-file-nginx /etc/nginx/sites-available/default -f
export custom_url_from_generate_nginx_func=$(awk '/SERVER_BASE_URL/ {print $3}' /opt/config.py | sed "s/'//g")
python3 generate_nginx_standalone.py --server-base-url ${custom_url_from_generate_nginx_func} --output-file-nginx /etc/nginx/sites-available/default -f
}

main () {
generate_config
make_logdir
generate_nginx_config

local custom_url_path=$(python3 -c "from urllib.parse import urlparse; import os; result=urlparse(os.environ['SERVER_BASE_URL']); print(result.path.rstrip('/'))")
local custom_url_path=$(python3 -c "from urllib.parse import urlparse; import os; result=urlparse(os.environ['custom_url_from_generate_nginx_func']); print(result.path.rstrip('/'))")
echo "Found custom_url_path=${custom_url_path}"
echo "Found custom_url_path=${custom_url_path}"
cd /opt

Expand Down

0 comments on commit f909972

Please sign in to comment.