mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
examples: poetry-driven git scripts & aurweb service
This introduces examples of a gunicorn systemd service in addition to git script wrappers that can be used for poetry virtualenv-driven installations. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
290ef1a2ed
commit
e5dfd53b9a
4 changed files with 34 additions and 0 deletions
6
examples/aurweb-git-auth.sh
Normal file
6
examples/aurweb-git-auth.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Wrapper script used to call aurweb-git-update externally when
|
||||
# utilizing an app-based virtualenv.
|
||||
aurweb_dir="$HOME"
|
||||
cd $aurweb_dir
|
||||
exec poetry run aurweb-git-auth "$@"
|
6
examples/aurweb-git-serve.sh
Normal file
6
examples/aurweb-git-serve.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Wrapper script used to call aurweb-git-update externally when
|
||||
# utilizing an app-based virtualenv.
|
||||
aurweb_dir="$HOME"
|
||||
cd $aurweb_dir
|
||||
exec poetry run aurweb-git-serve "$@"
|
6
examples/aurweb-git-update.sh
Normal file
6
examples/aurweb-git-update.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Wrapper script used to call aurweb-git-update externally when
|
||||
# utilizing an app-based virtualenv.
|
||||
aurweb_dir="$HOME"
|
||||
cd $aurweb_dir
|
||||
exec poetry run aurweb-git-update "$@"
|
16
examples/aurweb.service
Normal file
16
examples/aurweb.service
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=aurweb asgi server
|
||||
|
||||
[Description]
|
||||
User=aur
|
||||
WorkingDirectory=/srv/http/aurweb
|
||||
ExecStart=/usr/bin/poetry run gunicorn \
|
||||
--log-config /srv/http/aurweb/logging.conf \
|
||||
--bind '0.0.0.0:8000' \
|
||||
--forwarded-allow-ips '*' \
|
||||
--workers 4 \
|
||||
-k uvicorn.workers.UvicornWorker \
|
||||
aurweb.asgi:app
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Reference in a new issue