aurweb/docker/mariadb-init-entrypoint.sh
Kevin Morris fa26c8078b
fix(docker): modify db configuration for new tests
A user that can create databases is now required for tests,
we use the 'root' user in Docker.

Added docker services:
---------------------
- mariadb_test - host localhost:13307

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-17 01:36:16 -08:00

12 lines
314 B
Bash
Executable file

#!/bin/bash
set -eou pipefail
# Setup a config for our mysql db.
cp -vf conf/config.dev conf/config
sed -i "s;YOUR_AUR_ROOT;$(pwd);g" conf/config
sed -ri "s/^;?(user) = .*$/\1 = aur/g" conf/config
sed -ri "s/^;?(password) = .*$/\1 = aur/g" conf/config
python -m aurweb.initdb 2>/dev/null || /bin/true
exec "$@"