diff --git a/conf/nginx.conf b/conf/nginx.conf index 783a1a2..064ef3e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -15,7 +15,7 @@ location __PATH__/ { } fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php7.0-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/conf/systemd.service b/conf/systemd.service index 96cfc7b..00c0a27 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,6 +10,8 @@ WorkingDirectory=__FINALPATH__ ExecStart=/usr/bin/php daemon.php start --url=https://__DOMAIN__/__PATH__ --port=__PORT__ StandardOutput=syslog SyslogIdentifier=__APP__ +Restart=on-failure +RestartSec=10 [Install] WantedBy=multi-user.target diff --git a/scripts/_common.sh b/scripts/_common.sh index 48b9920..f8a313a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="postgresql apt-transport-https composer" +pkg_dependencies="postgresql postgresql-contrib apt-transport-https composer" extra_php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-xml"