Add environment file

This commit is contained in:
Edgar P. Burkhart 2022-05-21 18:44:46 +02:00
parent 589f9a9b46
commit 74872b94b7
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,5 @@
pkgname=nummi-git
pkgver=r50.8c3f573
pkgver=r51.589f9a9
pkgrel=1
pkgdesc="Web-based accounting interface"
arch=("any")
@ -17,6 +17,7 @@ source=(
"${pkgname%-git}.tmpfiles"
"${pkgname%-git}.sysusers"
"${pkgname%-git}.nginx"
"${pkgname%-git}.env"
)
md5sums=('SKIP'
'e584076aa2c41057634ed162ecf4a2b0'
@ -33,6 +34,7 @@ package() {
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 -D ${pkgname%-git}.env -t "${pkgdir}"/etc/
cd ${pkgname%-git}/${pkgname%-git}
find * -type f -exec install -Dm0644 "{}" "${pkgdir}/usr/share/webapps/${pkgname%-git}/{}" \;

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"

View file

@ -8,6 +8,7 @@ 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