mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-25 14:31:56 +00:00
Compare commits
5 Commits
e9ec4c4f8e
...
6fbb8ab4a2
Author | SHA1 | Date | |
---|---|---|---|
|
6fbb8ab4a2 | ||
|
36805ae6bb | ||
|
4c83a790ac | ||
|
b7fe85cd5b | ||
|
a10a0f09dd |
10
CHANGELOG.md
10
CHANGELOG.md
@ -13,6 +13,16 @@ Be cautious of copycat or coat-tailing sites that exploit the project's populari
|
||||
> [!NOTE]
|
||||
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||
|
||||
## 2024-10-10
|
||||
|
||||
### Changed
|
||||
|
||||
- **MySQL LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/mysql-install.sh)
|
||||
- NEW Script
|
||||
- **Tianji LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/4c83a790ac9b040da1f11ad2cbe13d3fc5f480e9)
|
||||
- Breaking Change
|
||||
- Switch from `pm2` process management to `systemd`
|
||||
|
||||
## 2024-10-03
|
||||
|
||||
### Changed
|
||||
|
@ -63,7 +63,7 @@ RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/releases/latest |
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
|
||||
msg_info "Stopping ${APP} Service"
|
||||
pm2 stop tianji >/dev/null 2>&1
|
||||
systemctl stop tianji
|
||||
msg_ok "Stopped ${APP} Service"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
@ -75,7 +75,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
pm2 start tianji >/dev/null 2>&1
|
||||
systemctl start tianji
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
|
@ -37,8 +37,9 @@ msg_ok "Installed MySQL"
|
||||
msg_info "Configure MySQL Server"
|
||||
ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
$STD mysql -uroot -p"$ADMIN_PASS" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$ADMIN_PASS'; FLUSH PRIVILEGES;"
|
||||
echo "" >>~/mysql.creds
|
||||
echo -e "MySQL Root Password: $ADMIN_PASS" >>~/mysql.creds
|
||||
echo "" >~/mysql.creds
|
||||
echo -e "MySQL user: root" >>~/mysql.creds
|
||||
echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
|
||||
msg_ok "MySQL Server configured"
|
||||
|
||||
read -r -p "Would you like to add PhpMyAdmin? <y/N> " prompt
|
||||
|
@ -38,7 +38,6 @@ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.co
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g pnpm@9.7.1
|
||||
$STD npm install -g pm2
|
||||
export NODE_OPTIONS="--max_old_space_size=4096"
|
||||
msg_ok "Installed Node.js, pnpm & pm2"
|
||||
|
||||
@ -77,15 +76,30 @@ cat <<EOF >/opt/tianji/src/server/.env
|
||||
DATABASE_URL="postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?schema=public"
|
||||
JWT_SECRET="$TIANJI_SECRET"
|
||||
EOF
|
||||
cd /opt/tianji
|
||||
$STD npm install pm2 -g
|
||||
$STD pm2 install pm2-logrotate
|
||||
cd src/server
|
||||
cd /opt/tianji/src/server
|
||||
$STD pnpm db:migrate:apply
|
||||
$STD pm2 start /opt/tianji/src/server/dist/src/server/main.js --name tianji
|
||||
$STD pm2 save
|
||||
msg_ok "Installed Tianji"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/tianji.service
|
||||
[Unit]
|
||||
Description=Tianji Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/node /opt/tianji/src/server/dist/src/server/main.js
|
||||
WorkingDirectory=/opt/tianji/src/server
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
Environment=NODE_ENV=production
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now tianji.service
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user