1
0
mirror of https://github.com/tteck/Proxmox.git synced 2024-12-25 10:42:53 +02:00

Update nocodb-install.sh

- full code overhaul
This commit is contained in:
tteckster 2023-10-21 09:52:23 -04:00 committed by GitHub
parent abd627f93b
commit f3c8d3c774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,25 +17,13 @@ msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y git
$STD apt-get install -y make
$STD apt-get install -y g++
$STD apt-get install -y gcc
msg_ok "Installed Dependencies"
msg_info "Installing Node.js"
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh)
. ~/.bashrc
$STD nvm install 16.20.1
ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node
ln -sf /root/.nvm/versions/node/v16.20.1/bin/npm /usr/bin/npm
msg_ok "Installed Node.js"
msg_info "Installing NocoDB"
$STD git clone https://github.com/nocodb/nocodb-seed
mv nocodb-seed /opt/nocodb
mkdir -p /opt/nocodb
cd /opt/nocodb
$STD npm install
curl -s http://get.nocodb.com/linux-x64 -o nocodb -L
chmod +x nocodb
msg_ok "Installed NocoDB"
msg_info "Creating Service"
@ -48,11 +36,11 @@ Type=simple
Restart=always
User=root
WorkingDirectory=/opt/nocodb
ExecStart=/usr/bin/npm start
ExecStart=/opt/nocodb/./nocodb
[Install]
WantedBy=multi-user.target" >$service_path
systemctl enable --now nocodb.service &>/dev/null
systemctl enable -q --now nocodb.service &>/dev/null
msg_ok "Created Service"
motd_ssh