aurweb/docker/fastapi-entrypoint.sh
Kevin Morris dbeebd3b01
change(fastapi): setup live database in mariadb-init-entrypoint.sh
Centralize database setup there and remove all copying of
config.dev from the entrypoint scripts (the Dockerfile
now does it).

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-27 23:29:49 -08:00

22 lines
644 B
Bash
Executable file

#!/bin/bash
set -eou pipefail
# Setup database.
NO_INITDB=1 /docker/mariadb-init-entrypoint.sh
# Setup some other options.
aurweb-config set options cache 'redis'
aurweb-config set options redis_address 'redis://redis'
aurweb-config set options aur_location "$AURWEB_FASTAPI_PREFIX"
aurweb-config set options git_clone_uri_anon "${AURWEB_FASTAPI_PREFIX}/%s.git"
aurweb-config set options git_clone_uri_priv "${AURWEB_SSHD_PREFIX}/%s.git"
if [ ! -z ${COMMIT_HASH+x} ]; then
aurweb-config set devel commit_hash "$COMMIT_HASH"
fi
# Setup prometheus directory.
rm -rf $PROMETHEUS_MULTIPROC_DIR
mkdir -p $PROMETHEUS_MULTIPROC_DIR
exec "$@"