This commit is contained in:
CanbiZ 2025-10-23 15:42:04 +02:00
parent aad0ee8120
commit 801f27c54a
2 changed files with 56 additions and 79 deletions

View File

@ -1,48 +1,48 @@
{
"name": "MySQL",
"slug": "mysql",
"categories": [
8
],
"date_created": "2024-10-10",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": null,
"documentation": "https://dev.mysql.com/doc/",
"website": "https://www.mysql.com/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/mysql.webp",
"config_path": "",
"description": "MySQL is an open-source relational database management system (RDBMS) that uses SQL for managing and manipulating data. It is known for its scalability, reliability, and high performance, making it suitable for small to large-scale applications. Key features include support for ACID transactions, data replication for high availability, and compatibility with various programming languages like Python, PHP, and Java.",
"install_methods": [
{
"type": "default",
"script": "ct/mysql.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
"name": "MySQL",
"slug": "mysql",
"categories": [
8
],
"date_created": "2024-10-10",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": null,
"documentation": "https://dev.mysql.com/doc/",
"website": "https://www.mysql.com/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/mysql.webp",
"config_path": "",
"description": "MySQL is an open-source relational database management system (RDBMS) that uses SQL for managing and manipulating data. It is known for its scalability, reliability, and high performance, making it suitable for small to large-scale applications. Key features include support for ACID transactions, data replication for high availability, and compatibility with various programming languages like Python, PHP, and Java.",
"install_methods": [
{
"type": "default",
"script": "ct/mysql.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Database credentials: `cat mysql.creds`",
"type": "info"
},
"notes": [
{
"text": "Database credentials: `cat mysql.creds`",
"type": "info"
},
{
"text": "With an option to install the MySQL 8.4 LTS release instead of MySQL 8.0",
"type": "info"
},
{
"text": "If installed, access phpMyAdmin at `http://<LXC_IP>/phpMyAdmin`, case sensitive.",
"type": "info"
}
]
{
"text": "With an option to install the MySQL 8.4 LTS release instead of MySQL 8.0",
"type": "info"
},
{
"text": "If installed, access phpMyAdmin at `http://<LXC_IP>/phpMyAdmin`, case sensitive.",
"type": "info"
}
]
}

View File

@ -13,51 +13,28 @@ setting_up_container
network_check
update_os
msg_info "Detecting Distro"
DISTRO_OS=$(awk -F= '/^ID=/{print $2}' /etc/os-release)
DISTRO_VER=$(awk -F= '/^VERSION_ID=/{print $2}' /etc/os-release | tr -d '"')
case "$DISTRO_OS" in
debian)
if [[ "$DISTRO_VER" == "12" ]]; then
DISTRO_VER="11"
fi
;;
ubuntu)
if [[ "$DISTRO_VER" == "22.04" ]]; then
DISTRO_VER="20.04"
NEEDS_LIBSSL1_1=true
fi
;;
esac
msg_ok "Detected $DISTRO_OS $DISTRO_VER"
msg_info "Installing Dependencies"
if [[ "${NEEDS_LIBSSL1_1:-false}" == "true" ]]; then
echo "deb http://security.ubuntu.com/ubuntu focal-security main" >/etc/apt/sources.list.d/focal-security.list
$STD apt update
$STD apt install -y libssl1.1
rm -f /etc/apt/sources.list.d/focal-security.list
fi
temp_file=$(mktemp)
curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb" -o "$temp_file"
$STD dpkg -i $temp_file
msg_ok "Installed Dependencies"
msg_info "Setting up InvenTree Repository"
mkdir -p /etc/apt/keyrings
curl -fsSL https://dl.packager.io/srv/inventree/InvenTree/key | gpg --dearmor -o /etc/apt/keyrings/inventree.gpg
echo "deb [signed-by=/etc/apt/keyrings/inventree.gpg] https://dl.packager.io/srv/deb/inventree/InvenTree/stable/${DISTRO_OS} ${DISTRO_VER} main" \
>/etc/apt/sources.list.d/inventree.list
$STD apt update
echo "deb [signed-by=/etc/apt/keyrings/inventree.gpg] https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04 main" >/etc/apt/sources.list.d/inventree.list
msg_ok "Set up InvenTree Repository"
msg_info "Installing InvenTree"
$STD apt install -y inventree || msg_error "Failed to install InvenTree"
msg_ok "Installed InvenTree"
msg_info "Setup ${APPLICATION} (Patience)"
$STD apt-get update
$STD apt-get install -y inventree
msg_ok "Setup ${APPLICATION}"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
rm -f $temp_file
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"