File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ msg_ok "Set up PostgreSQL Repository"
3737msg_info " Installing Node.js"
3838$STD apt-get update
3939$STD apt-get install -y nodejs
40+ $STD npm install --global yarn
4041msg_ok " Installed Node.js"
4142
4243msg_info " Set up PostgreSQL"
@@ -65,7 +66,21 @@ wget -q "https://github.com/Requarks/wiki/archive/refs/tags/v${RELEASE}.tar.gz"
6566tar -xzf " $temp_file "
6667mv wiki-${RELEASE} /opt/wikijs
6768mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml
68- 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
69+ sed -i -E '
70+ /db:/,/^$/ {
71+ s|(host: ).*|\1localhost|;
72+ s|(port: ).*|\15432|;
73+ s|(user: ).*|\1' " $DB_USER " ' |;
74+ s|(pass: ).*|\1' " $DB_PASS " ' |;
75+ s|(db: ).*|\1' " $DB_NAME " ' |;
76+ }
77+ /^ssl:/,/^$/ {
78+ s|(enabled: ).*|\1false|;
79+ }
80+ ' /opt/wikijs/config.yml
81+ cd /opt/wikijs
82+ $STD yarn build
83+ $STD yarn install
6984echo " ${RELEASE} " > " /opt/${APPLICATION} _version.txt"
7085msg_ok " Installed Wiki.js"
7186
@@ -77,7 +92,7 @@ After=network.target
7792
7893[Service]
7994Type=simple
80- ExecStart=/usr/bin/node server
95+ ExecStart=/usr/bin/yarn start
8196Restart=always
8297User=root
8398Environment=NODE_ENV=production
You can’t perform that action at this time.
0 commit comments