aurweb/docker/fastapi-entrypoint.sh
moson 141dccbfd9
feat: Switch to postgres
Migrate from MariaDB to PostgreSQL.

Signed-off-by: moson <moson@archlinux.org>
2023-12-12 19:24:56 +01:00

22 lines
633 B
Bash
Executable file

#!/bin/bash
set -eou pipefail
# Setup database.
/docker/postgres-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 "$@"