mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-05-16 08:40:25 +00:00
Update wikijs-install.sh
This commit is contained in:
parent
3c289e7235
commit
bedfbd232d
@ -37,6 +37,7 @@ msg_ok "Set up PostgreSQL Repository"
|
|||||||
msg_info "Installing Node.js"
|
msg_info "Installing Node.js"
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y nodejs
|
$STD apt-get install -y nodejs
|
||||||
|
$STD npm install --global yarn
|
||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Set up PostgreSQL"
|
msg_info "Set up PostgreSQL"
|
||||||
@ -65,7 +66,21 @@ wget -q "https://github.com/Requarks/wiki/archive/refs/tags/v${RELEASE}.tar.gz"
|
|||||||
tar -xzf "$temp_file"
|
tar -xzf "$temp_file"
|
||||||
mv wiki-${RELEASE} /opt/wikijs
|
mv wiki-${RELEASE} /opt/wikijs
|
||||||
mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml
|
mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml
|
||||||
sed -i -E "s|(host: ).*|\1localhost|; s|(port: ).*|\15432|; s|(user: ).*|\1$DB_USER|; s|(pass: ).*|\1$DB_PASS|; s|(db: ).*|\1$DB_NAME|; s|(ssl: ).*|\1false|" /opt/wikijs/config.yml
|
sed -i -E '
|
||||||
|
/db:/,/^$/ {
|
||||||
|
s|(host: ).*|\1localhost|;
|
||||||
|
s|(port: ).*|\15432|;
|
||||||
|
s|(user: ).*|\1'"$DB_USER"'|;
|
||||||
|
s|(pass: ).*|\1'"$DB_PASS"'|;
|
||||||
|
s|(db: ).*|\1'"$DB_NAME"'|;
|
||||||
|
}
|
||||||
|
/^ssl:/,/^$/ {
|
||||||
|
s|(enabled: ).*|\1false|;
|
||||||
|
}
|
||||||
|
' /opt/wikijs/config.yml
|
||||||
|
cd /opt/wikijs
|
||||||
|
$STD yarn build
|
||||||
|
$STD yarn install
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
msg_ok "Installed Wiki.js"
|
msg_ok "Installed Wiki.js"
|
||||||
|
|
||||||
@ -77,7 +92,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/node server
|
ExecStart=/usr/bin/yarn start
|
||||||
Restart=always
|
Restart=always
|
||||||
User=root
|
User=root
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
|
Loading…
x
Reference in New Issue
Block a user