@@ -19,8 +19,8 @@ $STD apt-get install -y \
1919 yq
2020msg_ok " Installed Dependencies"
2121
22- NODE_VERSION=" 20 " setup_nodejs
23- fetch_and_deploy_gh_release " tududi" " chrisvel/tududi" " tarball" " v0.80 " " /opt/tududi"
22+ NODE_VERSION=" 22 " setup_nodejs
23+ fetch_and_deploy_gh_release " tududi" " chrisvel/tududi" " tarball" " latest " " /opt/tududi"
2424
2525msg_info " Configuring Tududi"
2626cd /opt/tududi
@@ -37,15 +37,16 @@ DB_LOCATION="/opt/tududi-db"
3737UPLOAD_DIR=" /opt/tududi-uploads"
3838mkdir -p {" $DB_LOCATION " ," $UPLOAD_DIR " }
3939SECRET=" $( openssl rand -hex 64) "
40- sed -e ' s/^GOOGLE/# &/' \
41- -e ' /TUDUDI_SESSION/s/^# //' \
42- -e ' /NODE_ENV/s/^# //' \
43- -e " s/your_session_secret_here/$SECRET /" \
44- -e ' s/development/production/' \
45- -e " \$ a\DB_FILE=$DB_LOCATION /production.sqlite3" \
46- -e " \$ a\TUDUDI_UPLOAD_PATH=$UPLOAD_DIR " \
47- /opt/tududi/backend/.env.example > /opt/tududi/backend/.env
48- export DB_FILE=" $DB_LOCATION /production.sqlite3"
40+ cat << EOF >/opt/tududi/backend/.env
41+ TUDUDI_SESSION_SECRET=${SECRET}
42+ TUDUDI_ALLOWED_ORIGINS=<your tududi IP or FQDN>
43+ NODE_ENV=production
44+ DB_FILE=${DB_LOCATION} /production.sqlite3
45+ TUDUDI_UPLOAD_PATH=${UPLOAD_DIR}
46+ DISABLE_TELEGRAM=true
47+ DIABLE_SCHEDULER=false
48+ EOF
49+ export DB_FILE=" ${DB_LOCATION} /production.sqlite3"
4950$STD npm run db:init
5051msg_ok " Created env and database"
5152
@@ -57,9 +58,9 @@ After=network.target
5758
5859[Service]
5960Type=simple
60- WorkingDirectory=/opt/tududi
61+ WorkingDirectory=/opt/tududi/backend
6162EnvironmentFile=/opt/tududi/backend/.env
62- ExecStart=/usr/bin/npm run start
63+ ExecStart=/usr/bin/bash /opt/tududi/backend/cmd/ start.sh
6364
6465[Install]
6566WantedBy=multi-user.target
0 commit comments