This guide shows all steps to deploy a webapp on uberspace.
NOTE: This shows my personal workflow. This might not be fitting for your webapp.
git clone <URL>
npm install
npm run build
Create all necessary databases and tables. For example via Uberspace PMA
cp .env.example .env
nano .env
This supervisor daemon cares about starting and restarting your backend in case of error or server reboot.
Create a new config file called <my_project>.ini
in ~/etc/services.d/
[program:<my_project>]
directory=/home/<username>/<path_to_project_folder>
command=node src/app.js
autostart=yes
autorestart=yes
Read your new config file and start the service:
supervisorctl reread #read new config files
supervisorctl update #start all new services
supervisorctl status #list all services with status info
supervisorctl restart <my_project> #restart service
To make your webservice reacheble under yourdomain/my_project use the web backends utilities
uberspace web backend set /<my_project> --http --port <PORT> --remove-prefix
uberspace web backend list
If you made changes to your project and want to update form git repo use this command
git pull && npm run build && supervisorctl restart <my_project>