1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Use PHP-FPM instead of uWSGI

This commit is contained in:
J. King 2021-05-16 15:59:52 -04:00
parent 7ba4cabdde
commit edb146b826
6 changed files with 32 additions and 63 deletions

27
dist/arch/PKGBUILD vendored
View file

@ -7,30 +7,30 @@ arch=("any")
url="https://thearsse.com/"
license=("MIT")
groups=()
depends=("php>=7.1" "php-intl" "php-sqlite" "uwsgi" "uwsgi-plugin-php")
makedepends=("composer")
depends=()
makedepends=()
checkdepends=()
optdepends=("php-pgsql: PostgreSQL database support")
provides=()
conflicts=()
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=()
install=
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-web.service"
"arsse-fetch.service"
"sysuser.conf"
"config.php"
"uwsgi.ini"
"php-fpm.conf"
"arsse.sh")
noextract=()
package() {
depends=("php" "php-intl" "php-sqlite" "php-fpm")
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"
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"
@ -38,19 +38,18 @@ package() {
cp LICENSE AUTHORS "$pkgdir/usr/share/licenses/arsse"
cp ../*.service "$pkgdir/usr/lib/systemd/system"
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"
chmod -R a=rX *
chmod a=rx usr/bin/arsse
chmod u=r etc/webapps/arsse/*
ln -sT "/etc/webapps/arsse/config.php" "usr/share/webapps/arsse/config.php"
}
md5sums=('c7c9526f02fe34bf6f8399eff95c819d'
'53f150081dc9097790166ac22575fb1d'
'9ed9119aff93e0099c15cd12a3f71655'
'71a5975aed6b2da581262441f14bc929'
md5sums=('93327083c316daf879c70921189ed7b6'
'91871736d9594b2c92d1fa6b6e4f2803'
'0ca05e2965247d4651a986aad81d80e1'
'b6ef9ab7e9062df1d5ba060066b6d734'
'33e7a5b290ef20339952f1d904b33f8f'
'ff8fc77353d8e06f5c74ad577880a19d'
'943d35272b0aa7af2bf3818a0c9bd5fc'
'4fb46ec290e497279c3dd7c8c528abf6')

View file

@ -1,6 +1,7 @@
[Unit]
Description=The Arsse newsfeed fetching service
Documentation=https://thearsse.com/manual/
PartOf=arsse.service
[Service]
User=arsse

View file

@ -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

View file

@ -2,7 +2,8 @@
Description=The Arsse newsfeed management service
Documentation=https://thearsse.com/manual/
Requires=arsse-fetch.service
BindsTo=arsse-web.service
BindsTo=php-fpm.service
After=php-fpm.service
[Service]
Type=oneshot

16
dist/arch/php-fpm.conf vendored Normal file
View 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
View file

@ -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