|
|
@ -43,6 +43,7 @@ sudo cp -a ../sources/. $src_path
|
|
|
|
# you may need to make some file and/or directory writeable by www-data (nginx user)
|
|
|
|
# you may need to make some file and/or directory writeable by www-data (nginx user)
|
|
|
|
sudo chown -R root: $src_path
|
|
|
|
sudo chown -R root: $src_path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### MySQL (can be removed if not used) ###
|
|
|
|
# If your app use a MySQL database you can use these lines to bootstrap
|
|
|
|
# If your app use a MySQL database you can use these lines to bootstrap
|
|
|
|
# a database, an associated user and save the password in app settings.
|
|
|
|
# a database, an associated user and save the password in app settings.
|
|
|
|
#
|
|
|
|
#
|
|
|
@ -56,6 +57,7 @@ sudo chown -R root: $src_path
|
|
|
|
# # Load initial SQL into the new database
|
|
|
|
# # Load initial SQL into the new database
|
|
|
|
# ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" \
|
|
|
|
# ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" \
|
|
|
|
# < "../sources/sql/mysql.init.sql"
|
|
|
|
# < "../sources/sql/mysql.init.sql"
|
|
|
|
|
|
|
|
### MySQL end ###
|
|
|
|
|
|
|
|
|
|
|
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
|
|
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
|
|
|
nginx_conf=../conf/nginx.conf
|
|
|
|
nginx_conf=../conf/nginx.conf
|
|
|
@ -63,10 +65,10 @@ sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf
|
|
|
|
sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf
|
|
|
|
sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf
|
|
|
|
# If a dedicated php-fpm process is used:
|
|
|
|
# If a dedicated php-fpm process is used:
|
|
|
|
# Don't forget to modify ../conf/nginx.conf accordingly or your app will not work!
|
|
|
|
# Don't forget to modify ../conf/nginx.conf accordingly or your app will not work!
|
|
|
|
#
|
|
|
|
|
|
|
|
# sed -i "s@YNH_WWW_APP@$app@g" $nginx_conf
|
|
|
|
# sed -i "s@YNH_WWW_APP@$app@g" $nginx_conf
|
|
|
|
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### PHP (can be removed if not used) ###
|
|
|
|
# If a dedicated php-fpm process is used:
|
|
|
|
# If a dedicated php-fpm process is used:
|
|
|
|
# Don't forget to modify ../conf/php-fpm.conf accordingly or your app will not work!
|
|
|
|
# Don't forget to modify ../conf/php-fpm.conf accordingly or your app will not work!
|
|
|
|
#
|
|
|
|
#
|
|
|
@ -77,6 +79,8 @@ sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
# sudo cp ../conf/php-fpm.conf $finalphpconf
|
|
|
|
# sudo cp ../conf/php-fpm.conf $finalphpconf
|
|
|
|
# sudo chown root: $finalphpconf
|
|
|
|
# sudo chown root: $finalphpconf
|
|
|
|
# sudo chmod 644 $finalphpconf
|
|
|
|
# sudo chmod 644 $finalphpconf
|
|
|
|
|
|
|
|
# sudo service php5-fpm reload
|
|
|
|
|
|
|
|
### PHP end ###
|
|
|
|
|
|
|
|
|
|
|
|
# If app is public, add url to SSOWat conf as skipped_uris
|
|
|
|
# If app is public, add url to SSOWat conf as skipped_uris
|
|
|
|
if [[ $is_public -eq 1 ]]; then
|
|
|
|
if [[ $is_public -eq 1 ]]; then
|
|
|
@ -86,6 +90,3 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
# Reload services
|
|
|
|
# Reload services
|
|
|
|
sudo service nginx reload
|
|
|
|
sudo service nginx reload
|
|
|
|
|
|
|
|
|
|
|
|
# If a dedicated php-fpm process is used:
|
|
|
|
|
|
|
|
# sudo service php5-fpm reload
|
|
|
|
|
|
|
|