change(docker): use aurweb-config to update AUR_CONFIG

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-27 18:46:42 -08:00
parent 0726a08677
commit 5b350bc361
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
4 changed files with 37 additions and 37 deletions

View file

@ -42,20 +42,16 @@ EOF
cp -vf conf/config.dev $AUR_CONFIG
sed -i "s;YOUR_AUR_ROOT;$(pwd);g" $AUR_CONFIG
sed -ri "s/^;?(user) = .*$/\1 = aur/" $AUR_CONFIG
sed -ri "s/^;?(password) = .*$/\1 = aur/" $AUR_CONFIG
# Setup database.
aurweb-config set database user 'aur'
aurweb-config set database password 'aur'
aurweb-config set database host 'localhost'
aurweb-config set database socket '/var/lib/mysqld/mysqld.sock'
aurweb-config unset database port
AUR_CONFIG_DEFAULTS="${AUR_CONFIG}.defaults"
if [[ "$AUR_CONFIG_DEFAULTS" != "/aurweb/conf/config.defaults" ]]; then
cp -vf conf/config.defaults $AUR_CONFIG_DEFAULTS
fi
# Set some defaults needed for pathing and ssh uris.
sed -ri "s|^(repo-path) = .+|\1 = /aurweb/aur.git/|" $AUR_CONFIG_DEFAULTS
# SSH_CMDLINE can be provided via override in docker-compose.aur-dev.yml.
sed -ri "s|^(ssh-cmdline) = .+$|\1 = ${SSH_CMDLINE}|" $AUR_CONFIG_DEFAULTS
# Setup some other options.
aurweb-config set serve repo-path '/aurweb/aur.git/'
aurweb-config set serve ssh-cmdline "$SSH_CMDLINE"
# Setup SSH Keys.
ssh-keygen -A