mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
rebase mariadb feature onto dev
This commit is contained in:

committed by
Trenton Holmes

parent
15d074d39c
commit
65cfd55027
@@ -118,12 +118,12 @@ ask "Current time zone" "$default_time_zone"
|
||||
TIME_ZONE=$ask_result
|
||||
|
||||
echo ""
|
||||
echo "Database backend: PostgreSQL and SQLite are available. Use PostgreSQL"
|
||||
echo "Database backend: PostgreSQL, MariaDB, and SQLite are available. Use PostgreSQL"
|
||||
echo "if unsure. If you're running on a low-power device such as Raspberry"
|
||||
echo "Pi, use SQLite to save resources."
|
||||
echo ""
|
||||
|
||||
ask "Database backend" "postgres" "postgres sqlite"
|
||||
ask "Database backend" "postgres" "postgres sqlite" "mariadb"
|
||||
DATABASE_BACKEND=$ask_result
|
||||
|
||||
echo ""
|
||||
@@ -227,6 +227,18 @@ if [[ "$DATABASE_BACKEND" == "postgres" ]] ; then
|
||||
POSTGRES_FOLDER=$ask_result
|
||||
fi
|
||||
|
||||
if [[ "$DATABASE_BACKEND" == "mariadb" ]] ; then
|
||||
echo ""
|
||||
echo "The database folder, where mariadb stores its data."
|
||||
echo ""
|
||||
echo "CAUTION: If specified, you must specify an absolute path starting with /"
|
||||
echo "or a relative path starting with ./ here."
|
||||
echo ""
|
||||
|
||||
ask_docker_folder "Database folder" ""
|
||||
MARIADB_FOLDER=$ask_result
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "3. Login credentials"
|
||||
echo "===================="
|
||||
@@ -285,6 +297,9 @@ if [[ "$DATABASE_BACKEND" == "postgres" ]] ; then
|
||||
echo "Database (postgres) folder: $POSTGRES_FOLDER"
|
||||
fi
|
||||
fi
|
||||
if [[ "$DATABASE_BACKEND" == "mariadb" ]] ; then
|
||||
echo "Database (mariadb) folder: $MARIADB_FOLDER"
|
||||
fi
|
||||
echo ""
|
||||
echo "URL: $URL"
|
||||
echo "Port: $PORT"
|
||||
@@ -361,6 +376,10 @@ if [[ -n $POSTGRES_FOLDER ]] ; then
|
||||
sed -i "/^\s*pgdata:/d" docker-compose.yml
|
||||
fi
|
||||
|
||||
if [[ -n $MARIADB_FOLDER ]] ; then
|
||||
sed -i "s#- dbdata:/var/lib/mariadb/data#- $MARIADB_FOLDER:/var/lib/mariadb/data#g" docker-compose.yml
|
||||
fi
|
||||
|
||||
# remove trailing blank lines from end of file
|
||||
sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' docker-compose.yml
|
||||
# if last line in file contains "volumes:", remove that line since no more named volumes are left
|
||||
|
Reference in New Issue
Block a user