mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "6fbb8ab4a218638ca1c8c01f12ab0657c0f4a39b" and "e9ec4c4f8ed641e1aca2d9060003256348902d67" have entirely different histories.
6fbb8ab4a2
...
e9ec4c4f8e
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -13,16 +13,6 @@ 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"
|
||||
systemctl stop tianji
|
||||
pm2 stop tianji >/dev/null 2>&1
|
||||
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}"
|
||||
systemctl start tianji
|
||||
pm2 start tianji >/dev/null 2>&1
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
|
|
|
@ -37,9 +37,8 @@ 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 user: root" >>~/mysql.creds
|
||||
echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
|
||||
echo "" >>~/mysql.creds
|
||||
echo -e "MySQL Root Password: $ADMIN_PASS" >>~/mysql.creds
|
||||
msg_ok "MySQL Server configured"
|
||||
|
||||
read -r -p "Would you like to add PhpMyAdmin? <y/N> " prompt
|
||||
|
|
|
@ -38,6 +38,7 @@ 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"
|
||||
|
||||
|
@ -76,30 +77,15 @@ 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/src/server
|
||||
cd /opt/tianji
|
||||
$STD npm install pm2 -g
|
||||
$STD pm2 install pm2-logrotate
|
||||
cd 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