mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(fastapi): setup live database in mariadb-init-entrypoint.sh
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>
This commit is contained in:
parent
343a306bb8
commit
dbeebd3b01
6 changed files with 34 additions and 40 deletions
|
@ -1,12 +1,30 @@
|
|||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
# Prepare AUR_CONFIG.
|
||||
cp -vf conf/config.dev conf/config
|
||||
sed -i "s;YOUR_AUR_ROOT;$(pwd);g" conf/config
|
||||
# Setup the DB.
|
||||
NO_INITDB=1 /docker/mariadb-init-entrypoint.sh
|
||||
|
||||
# Create directories we need.
|
||||
mkdir -p /aurweb/aurblup
|
||||
# Create aurblup's directory.
|
||||
AURBLUP_DIR="/aurweb/aurblup/"
|
||||
mkdir -p $AURBLUP_DIR
|
||||
|
||||
# Setup aurblup config for Docker.
|
||||
AURBLUP_DBS='core extra community multilib testing community-testing'
|
||||
AURBLUP_SERVER='https://mirrors.kernel.org/archlinux/%s/os/x86_64'
|
||||
aurweb-config set aurblup db-path "$AURBLUP_DIR"
|
||||
aurweb-config set aurblup sync-dbs "$AURBLUP_DBS"
|
||||
aurweb-config set aurblup server "$AURBLUP_SERVER"
|
||||
|
||||
# Setup mkpkglists config for Docker.
|
||||
ARCHIVE_DIR='/var/lib/aurweb/archives'
|
||||
aurweb-config set mkpkglists archivedir "$ARCHIVE_DIR"
|
||||
aurweb-config set mkpkglists packagesfile "$ARCHIVE_DIR/packages.gz"
|
||||
aurweb-config set mkpkglists packagesmetafile \
|
||||
"$ARCHIVE_DIR/packages-meta-v1.json.gz"
|
||||
aurweb-config set mkpkglists packagesmetaextfile \
|
||||
"$ARCHIVE_DIR/packages-meta-ext-v1.json.gz"
|
||||
aurweb-config set mkpkglists pkgbasefile "$ARCHIVE_DIR/pkgbase.gz"
|
||||
aurweb-config set mkpkglists userfile "$ARCHIVE_DIR/users.gz"
|
||||
|
||||
# Install the cron configuration.
|
||||
cp /docker/config/aurweb-cron /etc/cron.d/aurweb-cron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue