mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
By default we now use uvicorn because it has a much better developer feedback out of the box. We'll work on hypercorn logging, but for now, hypercorn is usable via: `docker-compose --env-file docker/hypercorn.env up nginx`. Signed-off-by: Kevin Morris <kevr@0cost.org>
21 lines
629 B
Bash
Executable file
21 lines
629 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Initialize the new database; ignore errors.
|
|
python -m aurweb.initdb 2>/dev/null || /bin/true
|
|
|
|
if [ "$1" == "uvicorn" ] || [ "$1" == "" ]; then
|
|
exec uvicorn --reload \
|
|
--ssl-certfile /cache/localhost.cert.pem \
|
|
--ssl-keyfile /cache/localhost.key.pem \
|
|
--log-config /docker/logging.conf \
|
|
--host "0.0.0.0" \
|
|
--port 8000 \
|
|
aurweb.asgi:app
|
|
else
|
|
exec hypercorn --reload \
|
|
--certfile /cache/localhost.cert.pem \
|
|
--keyfile /cache/localhost.key.pem \
|
|
--log-config /docker/logging.conf \
|
|
-b "0.0.0.0:8000" \
|
|
aurweb.asgi:app
|
|
fi
|