mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Use PHP-FPM instead of uWSGI
This commit is contained in:
parent
7ba4cabdde
commit
edb146b826
6 changed files with 32 additions and 63 deletions
27
dist/arch/PKGBUILD
vendored
27
dist/arch/PKGBUILD
vendored
|
@ -7,30 +7,30 @@ arch=("any")
|
||||||
url="https://thearsse.com/"
|
url="https://thearsse.com/"
|
||||||
license=("MIT")
|
license=("MIT")
|
||||||
groups=()
|
groups=()
|
||||||
depends=("php>=7.1" "php-intl" "php-sqlite" "uwsgi" "uwsgi-plugin-php")
|
depends=()
|
||||||
makedepends=("composer")
|
makedepends=()
|
||||||
checkdepends=()
|
checkdepends=()
|
||||||
optdepends=("php-pgsql: PostgreSQL database support")
|
optdepends=("php-pgsql: PostgreSQL database support")
|
||||||
provides=()
|
provides=()
|
||||||
conflicts=()
|
conflicts=()
|
||||||
replaces=()
|
replaces=()
|
||||||
backup=("etc/webapps/arsse/config.php" "etc/webapps/arsse/uwsgi.ini")
|
backup=("etc/webapps/arsse/config.php" "etc/php/php-fpm.d/arsse.conf")
|
||||||
options=()
|
options=()
|
||||||
install=
|
install=
|
||||||
changelog=
|
changelog=
|
||||||
source=("https://code.mensbeam.com/attachments/229880aa-3fcc-499f-b747-6932a661dc0e"
|
source=("https://thearsse.com/releases/0.9.0.tar.gz"
|
||||||
"arsse.service"
|
"arsse.service"
|
||||||
"arsse-web.service"
|
|
||||||
"arsse-fetch.service"
|
"arsse-fetch.service"
|
||||||
"sysuser.conf"
|
"sysuser.conf"
|
||||||
"config.php"
|
"config.php"
|
||||||
"uwsgi.ini"
|
"php-fpm.conf"
|
||||||
"arsse.sh")
|
"arsse.sh")
|
||||||
noextract=()
|
noextract=()
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
depends=("php" "php-intl" "php-sqlite" "php-fpm")
|
||||||
cd "$pkgdir"
|
cd "$pkgdir"
|
||||||
mkdir -p "usr/bin" "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "etc/webapps/arsse"
|
mkdir -p "usr/bin" "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "etc/webapps/arsse" "etc/php/php-fpm.d/"
|
||||||
cd "$srcdir/arsse"
|
cd "$srcdir/arsse"
|
||||||
cp ../arsse.sh "$pkgdir/usr/bin/arsse"
|
cp ../arsse.sh "$pkgdir/usr/bin/arsse"
|
||||||
cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse"
|
cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse"
|
||||||
|
@ -38,19 +38,18 @@ package() {
|
||||||
cp LICENSE AUTHORS "$pkgdir/usr/share/licenses/arsse"
|
cp LICENSE AUTHORS "$pkgdir/usr/share/licenses/arsse"
|
||||||
cp ../*.service "$pkgdir/usr/lib/systemd/system"
|
cp ../*.service "$pkgdir/usr/lib/systemd/system"
|
||||||
cp ../sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf"
|
cp ../sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf"
|
||||||
cp ../config.php config.defaults.php ../uwsgi.ini "$pkgdir/etc/webapps/arsse"
|
cp ../config.php config.defaults.php "$pkgdir/etc/webapps/arsse"
|
||||||
|
cp ../php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf"
|
||||||
cd "$pkgdir"
|
cd "$pkgdir"
|
||||||
chmod -R a=rX *
|
chmod -R a=rX *
|
||||||
chmod a=rx usr/bin/arsse
|
chmod a=rx usr/bin/arsse
|
||||||
chmod u=r etc/webapps/arsse/*
|
chmod u=r etc/webapps/arsse/*
|
||||||
ln -sT "/etc/webapps/arsse/config.php" "usr/share/webapps/arsse/config.php"
|
ln -sT "/etc/webapps/arsse/config.php" "usr/share/webapps/arsse/config.php"
|
||||||
}
|
}
|
||||||
|
md5sums=('93327083c316daf879c70921189ed7b6'
|
||||||
md5sums=('c7c9526f02fe34bf6f8399eff95c819d'
|
'91871736d9594b2c92d1fa6b6e4f2803'
|
||||||
'53f150081dc9097790166ac22575fb1d'
|
'0ca05e2965247d4651a986aad81d80e1'
|
||||||
'9ed9119aff93e0099c15cd12a3f71655'
|
|
||||||
'71a5975aed6b2da581262441f14bc929'
|
|
||||||
'b6ef9ab7e9062df1d5ba060066b6d734'
|
'b6ef9ab7e9062df1d5ba060066b6d734'
|
||||||
'33e7a5b290ef20339952f1d904b33f8f'
|
'33e7a5b290ef20339952f1d904b33f8f'
|
||||||
'ff8fc77353d8e06f5c74ad577880a19d'
|
'943d35272b0aa7af2bf3818a0c9bd5fc'
|
||||||
'4fb46ec290e497279c3dd7c8c528abf6')
|
'4fb46ec290e497279c3dd7c8c528abf6')
|
||||||
|
|
1
dist/arch/arsse-fetch.service
vendored
1
dist/arch/arsse-fetch.service
vendored
|
@ -1,6 +1,7 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=The Arsse newsfeed fetching service
|
Description=The Arsse newsfeed fetching service
|
||||||
Documentation=https://thearsse.com/manual/
|
Documentation=https://thearsse.com/manual/
|
||||||
|
PartOf=arsse.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=arsse
|
User=arsse
|
||||||
|
|
33
dist/arch/arsse-web.service
vendored
33
dist/arch/arsse-web.service
vendored
|
@ -1,33 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=The Arsse newsfeed client service
|
|
||||||
Documentation=https://thearsse.com/manual/
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=arsse
|
|
||||||
Group=arsse
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/usr/share/webapps/arsse
|
|
||||||
ExecStart=/usr/bin/uwsgi /etc/webapps/arsse/uwsgi.ini
|
|
||||||
|
|
||||||
ProtectProc=invisible
|
|
||||||
NoNewPrivileges=true
|
|
||||||
ProtectSystem=full
|
|
||||||
ProtectHome=true
|
|
||||||
RuntimeDirectory=arsse
|
|
||||||
StateDirectory=arsse
|
|
||||||
ConfigurationDirectory=webapps/arsse
|
|
||||||
ReadOnlyPaths=/
|
|
||||||
ReadWriePaths=/usr/lib/arsse
|
|
||||||
NoExecPaths=/
|
|
||||||
ExecPaths=/usr/bin/uwsgi
|
|
||||||
PrivateTmp=true
|
|
||||||
PrivateDevices=true
|
|
||||||
RestrictSUIDSGID=true
|
|
||||||
StandardOutput=journal
|
|
||||||
StandardError=journal
|
|
||||||
SyslogIdentifier=arsse
|
|
||||||
Restart=on-failure
|
|
||||||
RestartPreventStatus=
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
3
dist/arch/arsse.service
vendored
3
dist/arch/arsse.service
vendored
|
@ -2,7 +2,8 @@
|
||||||
Description=The Arsse newsfeed management service
|
Description=The Arsse newsfeed management service
|
||||||
Documentation=https://thearsse.com/manual/
|
Documentation=https://thearsse.com/manual/
|
||||||
Requires=arsse-fetch.service
|
Requires=arsse-fetch.service
|
||||||
BindsTo=arsse-web.service
|
BindsTo=php-fpm.service
|
||||||
|
After=php-fpm.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
16
dist/arch/php-fpm.conf
vendored
Normal file
16
dist/arch/php-fpm.conf
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[arsse]
|
||||||
|
user = arsse
|
||||||
|
group = arsse
|
||||||
|
listen = /run/php-fpm/arsse.sock
|
||||||
|
listen.owner = arsse
|
||||||
|
listen.group = http
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 5
|
||||||
|
pm.start_servers = 2
|
||||||
|
pm.min_spare_servers = 1
|
||||||
|
pm.max_spare_servers = 3
|
||||||
|
|
||||||
|
php_value[extension] = intl
|
||||||
|
php_value[extension] = dom
|
||||||
|
php_value[extension] = iconv
|
||||||
|
php_value[extension] = sqlite3
|
15
dist/arch/uwsgi.ini
vendored
15
dist/arch/uwsgi.ini
vendored
|
@ -1,15 +0,0 @@
|
||||||
[uwsgi]
|
|
||||||
|
|
||||||
strict=true
|
|
||||||
uwsgi-socket=/run/arsse/uwsgi.socket
|
|
||||||
master=true
|
|
||||||
processes=4
|
|
||||||
workers=2
|
|
||||||
vacuum=true
|
|
||||||
plugin=php
|
|
||||||
php-sapi-name=apache
|
|
||||||
php-set=extension=curl
|
|
||||||
php-set=extension=iconv
|
|
||||||
php-set=extension=intl
|
|
||||||
php-set=extension=sqlite3
|
|
||||||
php-app=/usr/share/webapps/arsse/arsse.php
|
|
Loading…
Reference in a new issue