mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
At least two users were asking for support in Discord due to not selecting DBs to install. This aims to prevent confusion in that scenario.
20 lines
1.2 KiB
Bash
Executable File
20 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB")
|
|
choices=$(printf "%s\n" "${options[@]}" | gum choose --no-limit --header "Select databases (space to select, return to install, esc to cancel)") || main_menu
|
|
|
|
if [[ -n "$choices" ]]; then
|
|
for db in $choices; do
|
|
case $db in
|
|
MySQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8.4 ;;
|
|
PostgreSQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:5432:5432" --name=postgres16 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:16 ;;
|
|
MariaDB) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mariadb11 -e MARIADB_ROOT_PASSWORD= -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true mariadb:11.8 ;;
|
|
Redis) sudo docker run -d --restart unless-stopped -p "127.0.0.1:6379:6379" --name=redis redis:7 ;;
|
|
MongoDB) sudo docker run -d --restart unless-stopped -p "127.0.0.1:27017:27017" --name mongodb -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=admin123 mongo:noble ;;
|
|
esac
|
|
done
|
|
else
|
|
echo "No databases selected for installation."
|
|
sleep 1
|
|
fi
|