Skip to content
Snippets Groups Projects
Commit 666c2b1c authored by Bob Mottram's avatar Bob Mottram
Browse files

If daemon is specified then use proxy_pass

parent a7e550eb
No related branches found
No related tags found
No related merge requests found
......@@ -222,6 +222,9 @@ echo "${app_name_upper}_CODE="
echo "${app_name_upper}_ONION_PORT=$(( ( RANDOM % 1000 ) + 9010 ))"
echo "${app_name_upper}_REPO=\"${app_repo}\""
echo "${app_name_upper}_COMMIT='${app_repo_commit}'"
if [ $app_daemon ]; then
echo "${app_name_upper}_PORT=TODO"
fi
echo ''
echo "${app_name}=(ONION_ONLY"
echo " ${app_name_upper}_DOMAIN_NAME"
......@@ -670,7 +673,11 @@ if [ $app_onion_only ]; then
echo " echo ' # Location' >> \$${app_name}_nginx_site"
echo " echo ' location / {' >> \$${app_name}_nginx_site"
echo " nginx_limits \$${app_name_upper}_DOMAIN_NAME '15m'"
echo " echo ' try_files \$uri \$uri/ @${app_name};' >> \$${app_name}_nginx_site"
if [ ! $app_daemon ]; then
echo " echo ' try_files \$uri \$uri/ /index.html;' >> \$${app_name}_nginx_site"
else
echo " echo ' proxy_pass http://localhost:\$${app_name_upper}_PORT;' >> \$${app_name}_nginx_site"
fi
echo " echo ' }' >> \$${app_name}_nginx_site"
echo " echo '}' >> \$${app_name}_nginx_site"
echo ' else'
......@@ -708,7 +715,11 @@ fi
echo " echo ' # Location' >> \$${app_name}_nginx_site"
echo " echo ' location / {' >> \$${app_name}_nginx_site"
echo " nginx_limits \$${app_name_upper}_DOMAIN_NAME '15m'"
echo " echo ' try_files \$uri \$uri/ @${app_name};' >> \$${app_name}_nginx_site"
if [ ! $app_daemon ]; then
echo " echo ' try_files \$uri \$uri/ index.html;' >> \$${app_name}_nginx_site"
else
echo " echo ' proxy_pass http://localhost:\$${app_name_upper}_PORT;' >> \$${app_name}_nginx_site"
fi
echo " echo ' }' >> \$${app_name}_nginx_site"
echo " echo '}' >> \$${app_name}_nginx_site"
if [[ "$app_php" == 'yes' ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment