mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
17 lines
440 B
Bash
Executable file
17 lines
440 B
Bash
Executable file
#!/bin/bash
|
|
set -eou pipefail
|
|
|
|
# Setup a config for our mysql db.
|
|
aurweb-config set database name 'aurweb'
|
|
aurweb-config set database user 'aur'
|
|
aurweb-config set database password 'aur'
|
|
aurweb-config set database host 'localhost'
|
|
aurweb-config set database socket '/var/run/mysqld/mysqld.sock'
|
|
aurweb-config unset database port
|
|
|
|
if [ ! -z ${NO_INITDB+x} ]; then
|
|
exec "$@"
|
|
fi
|
|
|
|
python -m aurweb.initdb 2>/dev/null || /bin/true
|
|
exec "$@"
|