Compare commits

...

25 commits

Author SHA1 Message Date
65af7105b2
Merge pkgbuild
Add environment file, nginx config, systemd service, tmpfiles and PKGBUILD
2022-12-21 14:15:43 +01:00
f2ca55f451
Update dependencies 2022-12-20 17:00:42 +01:00
e42863dfe6
Remove matplotlib dependency 2022-05-24 17:16:22 +02:00
9bd38840f7
Add matplotlib to dependencies 2022-05-24 15:37:29 +02:00
00a214c948
Update gitignore; bump PKGBUILD 2022-05-22 18:54:44 +02:00
aeacf58612
Update PKGBUILD with b2 checksums 2022-05-21 19:06:16 +02:00
5c9668ca0c
Fix permissions on env file 2022-05-21 18:59:53 +02:00
6d4947bcca
Fix pkgver 2022-05-21 18:54:18 +02:00
2ccacd0d21
Fix pkgsums 2022-05-21 18:45:13 +02:00
74872b94b7
Add environment file 2022-05-21 18:44:46 +02:00
589f9a9b46
Fix VCS -> git in pkgbuild 2022-05-21 18:30:11 +02:00
8c3f573811
Update pkgbuild 2022-05-21 18:29:30 +02:00
c778a5fe32
Update PKGBUILD 2022-05-21 18:25:08 +02:00
ce0910ce97
Remove sha256 check 2022-05-21 18:18:55 +02:00
04d9c8ada7
Fix collectstatic --noinput 2022-05-21 18:15:34 +02:00
1e378f6306
Fix permission issues 2022-05-21 18:08:06 +02:00
ab35d774dc
Update pkgbuild and nginx to serve static 2022-05-21 17:53:07 +02:00
4157e20376
Fix socket issues 2022-05-21 16:09:40 +02:00
d3d69c513a
Remove reference to systemd socket 2022-05-21 16:08:02 +02:00
67f145a992
Make uvicorn work with socket 2022-05-21 16:07:12 +02:00
ea4959dc44
Replace gunicorn by uvicorn 2022-05-21 16:02:15 +02:00
5590308287
Add nginx conf to source 2022-05-21 16:00:06 +02:00
3b127c157b
Add nginx conf 2022-05-21 15:59:21 +02:00
7a23e798e5
Fix systemd service 2022-05-21 12:34:48 +02:00
dafa5bc75a
Update PKGBUILD 2022-05-21 12:32:03 +02:00
7 changed files with 91 additions and 5 deletions

4
.gitignore vendored
View file

@ -1,2 +1,6 @@
env*
__pycache__
*.pkg.tar.zst
/nummi-git/
/pkg/
/src/

45
PKGBUILD Normal file
View file

@ -0,0 +1,45 @@
pkgname=nummi-git
pkgver=r80.73ce1a2
pkgrel=1
pkgdesc="Web-based accounting interface"
arch=("any")
url="https://git.edgarpierre.fr/edpibu/nummi"
license=('AGPL3')
depends=(
"gunicorn"
"python-django"
"python-matplotlib"
)
makedepends=("git")
optdepends=("postgresql: database")
backup=("etc/${pkgname%-git}.env")
source=(
"${pkgname}::git+ssh://gitea@git.edgarpierre.fr:39529/edpibu/nummi.git"
"${pkgname%-git}.service"
"${pkgname%-git}.tmpfiles"
"${pkgname%-git}.sysusers"
"${pkgname%-git}.nginx"
"${pkgname%-git}.env"
)
b2sums=('SKIP'
'9e9b62a141bb4594dc203978d5c56dd397ed6c095e6f83fdea07ded2fa46dd2e052aa8f80729a3b612e3773aa487660fcca791079ad4885b825c9c831df61b45'
'2be5a55e8582a680a17c133c28b43f0a27800acc855c90ae670486b3847b91a47216d15a029670cdc3c55c193371b060cfe3b01bf4f858a64b64da9711067188'
'3d31754c644e05ec01bc07ebfb89749d563260abb4507297aceaaeebe2f057517ccc3e1c61dbb2eb864779260cd3c7aad01939775525b6bf6461267587dea156'
'b86c46f17b5445b5631a3725ed3d4cd3bf1e864c68f8db8cecba1f8ae554e1e4872d8a86bfe6ab5172507f8315ebeccf78c9fbe3bb9eeb71c21113450e0df4d5'
'5bdc097ab3fa7e8e128d194bfb6c0fefb5528903e2b8765557a82033f8925c1174dbe73007a595e32c5e415cf6f19957c35bbe463c50d2813894c20c8a28a88d')
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -Dm644 ${pkgname%-git}.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm644 ${pkgname%-git}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname%-git}.conf
install -Dm644 ${pkgname%-git}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname%-git}.conf
install -Dm644 ${pkgname%-git}.nginx "${pkgdir}"/etc/nginx/sites-enabled/${pkgname%-git}.conf
install -Dm750 ${pkgname%-git}.env -t "${pkgdir}"/etc/
cd ${pkgname}/${pkgname%-git}
find * -type f -exec install -Dm0644 "{}" "${pkgdir}/usr/share/webapps/${pkgname%-git}/{}" \;
}

View file

@ -2,8 +2,3 @@
Nummi is a web-based accounting software.
Nummi uses Django.
## Installation
A PKGBUILD along with system files is provided on the
[pkgbuild](https://git.edgarpierre.fr/edpibu/nummi/src/branch/pkgbuild) branch.

4
nummi.env Normal file
View file

@ -0,0 +1,4 @@
NUMMI_MEDIA_ROOT="/var/lib/nummi"
NUMMI_SECRET="xxxxxx"
#NUMMI_DEBUG="True"
NUMMI_HOST="nummi.edgarpierre.fr"

15
nummi.nginx Normal file
View file

@ -0,0 +1,15 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name nummi.edgarpierre.fr;
location / {
include conf/50-proxy.conf;
proxy_pass http://unix:/run/nummi/nummi.socket;
}
location /static {
alias /srv/nummi;
}
}

21
nummi.service Normal file
View file

@ -0,0 +1,21 @@
[Unit]
Description=Nummi server (accounting)
After=network.target
[Service]
Type=simple
User=nummi
Group=nummi
RuntimeDirectory=nummi
WorkingDirectory=/usr/share/webapps/nummi
EnvironmentFile=/etc/nummi.env
ExecStartPre=/usr/bin/python manage.py migrate
ExecStartPre=/usr/bin/python manage.py collectstatic --noinput
ExecStart=/usr/bin/uvicorn nummi.asgi:application --uds /run/nummi/nummi.socket
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=mixed
TimeoutStopSec=5
PrivateTmp=true
[Install]
WantedBy=multi-user.target

2
nummi.tmpfiles Normal file
View file

@ -0,0 +1,2 @@
d /var/lib/nummi 0750 nummi nummi
d /srv/nummi 0755 nummi nummi