Add fpm config finalize setup via occ
This commit is contained in:
parent
f8bc630fe1
commit
b07c8ef801
3 changed files with 37 additions and 3 deletions
26
files/fpm.conf
Normal file
26
files/fpm.conf
Normal file
|
@ -0,0 +1,26 @@
|
|||
[www]
|
||||
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
listen = /run/php/php7.0-fpm.sock
|
||||
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
|
||||
; Choose how process manager will control the number of child processes.
|
||||
pm = dynamic
|
||||
|
||||
pm.max_children = 5
|
||||
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
env[HOSTNAME] = $HOSTNAME
|
||||
env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
env[TMP] = /tmp
|
||||
env[TMPDIR] = /tmp
|
||||
env[TEMP] = /tmp
|
||||
|
||||
security.limit_extensions = .php
|
|
@ -25,8 +25,12 @@ admin_user=$(cat "$__object/parameter/admin-user")
|
|||
admin_pass=$(cat "$__object/parameter/admin-pass")
|
||||
# TODO check shasum of tar ball
|
||||
cat <<eof
|
||||
curl -s -L ${nextcloud_uri} -o /tmp/nextcloud.tar.bz2 &&
|
||||
tar -C /var/www -xvjf /tmp/nextcloud.tar.bz2 &&
|
||||
rm -f /tmp/nextcloud.tar.bz2 &&
|
||||
curl -s -L ${nextcloud_uri} -o /tmp/nextcloud.tar.bz2
|
||||
tar -C /var/www -xvjf /tmp/nextcloud.tar.bz2
|
||||
rm -f /tmp/nextcloud.tar.bz2
|
||||
chown -R www-data:www-data /var/www/nextcloud
|
||||
cd /var/www/nextcloud
|
||||
sudo -u www-data php occ maintenance:install --database \
|
||||
"pgsql" --database-name "$db_name" --database-user "$db_user" --database-pass \
|
||||
"$db_pass" --admin-user "$admin_user" --admin-pass "$admin_pass"
|
||||
eof
|
||||
|
|
4
manifest
4
manifest
|
@ -61,6 +61,10 @@ require="__apt_key_uri/dotdeb" __apt_source dotdeb --uri http://packages.dotdeb.
|
|||
|
||||
require="__apt_source/dotdeb" __apt_update_index
|
||||
|
||||
require="__package/php7.0-fpm" __file /etc/php/7.0/fpm/pool.d/www.conf \
|
||||
--owner root --group root --mode 644 --source "$__type/files/fpm.conf"
|
||||
|
||||
|
||||
|
||||
## Nginx
|
||||
require="__package/nginx" __file /etc/nginx/sites-enabled/nextcloud --owner www-data \
|
||||
|
|
Loading…
Reference in a new issue