autocommit

This commit is contained in:
leo 2024-09-21 04:01:05 +05:00
parent 4553c4700c
commit 3a6a1becdf
2 changed files with 30 additions and 2 deletions

View File

@ -1,8 +1,8 @@
services:
mariadb:
container_name: mariadb
image: mariadb:lts-ubi9
restart: always
image: mariadb:11.5.2-ubi9
restart: unless-stopped
networks:
- proxynet
env_file:

28
install.sh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo -e "\033[31mThis script requires superuser rights.\033[0m"
exit 0
fi
trap 'echo -e "\033[31minstall.sh: Something went wrong\033[0m"; exit 1' ERR
set -e
export DEBIAN_FRONTEND=noninteractive
echo "Install mariadb..."
cd /data/utils
bash global-env.sh MARIADB_USER admin
bash global-env.sh MARIADB_DB mariadb
sudo bash env-gen.sh MARIADB_ROOT_PASSWORD
MARIADBPASSWORD=$(pwgen -s 20 1);
sudo bash env-gen.sh MARIADB_PASSWORD $MARIADBPASSWORD
sudo bash env-gen.sh WORDPRESS_DB_PASSWORD $MARIADBPASSWORD
sudo bash env-gen.sh WP_ADMIN_PASSWORD
mkdir -p /data/appdata/mariadb
sudo chown -R 1001:1001 /data/appdata/mariadb
cd /data/mariadb
sudo docker compose up -d
trap - ERR
echo "Install postgres complete"