mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(docker): only use mariadb socket for connections
This commit is contained in:
parent
37232f71ee
commit
4e3cc1dfe2
7 changed files with 13 additions and 56 deletions
|
@ -1,19 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
[[ -z "$DB_HOST" ]] && echo 'Error: $DB_HOST required but missing.' && exit 1
|
||||
|
||||
DB_NAME="aurweb"
|
||||
DB_USER="aur"
|
||||
DB_PASS="aur"
|
||||
|
||||
# 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/^(name) = .+/\1 = ${DB_NAME}/" conf/config
|
||||
sed -ri "s/^(host) = .+/\1 = ${DB_HOST}/" conf/config
|
||||
sed -ri "s/^(user) = .+/\1 = ${DB_USER}/" conf/config
|
||||
sed -ri "s/^;?(password) = .+/\1 = ${DB_PASS}/" conf/config
|
||||
|
||||
sed -ri "s;^(aur_location) = .+;\1 = https://localhost:8444;" conf/config
|
||||
|
||||
|
|
|
@ -38,18 +38,9 @@ Match User aur
|
|||
AcceptEnv AUR_OVERWRITE
|
||||
EOF
|
||||
|
||||
DB_NAME="aurweb"
|
||||
DB_HOST="mariadb"
|
||||
DB_USER="aur"
|
||||
DB_PASS="aur"
|
||||
|
||||
# Setup a config for our mysql db.
|
||||
cp -vf conf/config.dev $AUR_CONFIG
|
||||
sed -i "s;YOUR_AUR_ROOT;$(pwd);g" $AUR_CONFIG
|
||||
sed -ri "s/^(name) = .+/\1 = ${DB_NAME}/" $AUR_CONFIG
|
||||
sed -ri "s/^(host) = .+/\1 = ${DB_HOST}/" $AUR_CONFIG
|
||||
sed -ri "s/^(user) = .+/\1 = ${DB_USER}/" $AUR_CONFIG
|
||||
sed -ri "s/^;?(password) = .+/\1 = ${DB_PASS}/" $AUR_CONFIG
|
||||
|
||||
AUR_CONFIG_DEFAULTS="${AUR_CONFIG}.defaults"
|
||||
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
[[ -z "$DB_HOST" ]] && echo 'Error: $DB_HOST required but missing.' && exit 1
|
||||
|
||||
DB_NAME="aurweb"
|
||||
DB_USER="aur"
|
||||
DB_PASS="aur"
|
||||
|
||||
# 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/^(name) = .+/\1 = ${DB_NAME}/" conf/config
|
||||
sed -ri "s/^(host) = .+/\1 = ${DB_HOST}/" conf/config
|
||||
sed -ri "s/^(user) = .+/\1 = ${DB_USER}/" conf/config
|
||||
sed -ri "s/^;?(password) = .+/\1 = ${DB_PASS}/" conf/config
|
||||
|
||||
python -m aurweb.initdb 2>/dev/null || /bin/true
|
||||
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
[[ -z "$DB_HOST" ]] && echo 'Error: $DB_HOST required but missing.' && exit 1
|
||||
|
||||
DB_NAME="aurweb"
|
||||
DB_USER="aur"
|
||||
DB_PASS="aur"
|
||||
|
||||
# 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/^(name) = .+/\1 = ${DB_NAME}/" conf/config
|
||||
sed -ri "s/^(host) = .+/\1 = ${DB_HOST}/" conf/config
|
||||
sed -ri "s/^(user) = .+/\1 = ${DB_USER}/" conf/config
|
||||
sed -ri "s/^;?(password) = .+/\1 = ${DB_PASS}/" conf/config
|
||||
|
||||
sed -ri "s;^(aur_location) = .+;\1 = https://localhost:8443;" conf/config
|
||||
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
[[ -z "$DB_HOST" ]] && echo 'Error: $DB_HOST required but missing.' && exit 1
|
||||
|
||||
DB_NAME="aurweb_test"
|
||||
DB_USER="aur"
|
||||
DB_PASS="aur"
|
||||
|
||||
# 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/^(name) = .+/\1 = ${DB_NAME}/" conf/config
|
||||
sed -ri "s/^(host) = .+/\1 = ${DB_HOST}/" conf/config
|
||||
sed -ri "s/^(user) = .+/\1 = ${DB_USER}/" conf/config
|
||||
sed -ri "s/^;?(password) = .+/\1 = ${DB_PASS}/" conf/config
|
||||
|
||||
# The port can be excluded from use if properly using
|
||||
# volumes to share the mysql socket from the mariadb service.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue