cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Rename config_template.py
in backend/config_template.py
to config.py
Change variable values in config.py
Rename settings_template.py
of backend/backend/settings_template.py
to settings.py
Fix warnings listed by the following command
python manage.py check --deploy
Rename gunicorn_template.service
of backend/gunicorn_template.service
to gunicorn.service
Change <NetShareWeb>
in gunicorn.service
to the correct path
Copy systemd unit file to system configuration directory and start the service
sudo cp gunicorn.service /etc/systemd/system/gunicorn.service
sudo systemctl start gunicorn
sudo systemctl enable gunicorn
sudo systemctl status gunicorn
Backend server is running on port 8000
Install nvm
Follows the instructions after running this command
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Install NodeJS with nvm
nvm install 18.16.0
cd frontend
npm install
npm install -g pm2
pm2 start pm2.config.js
Frontend is running on port 3000
Install NGINX
sudo apt update
sudo apt install nginx
Rename netshareweb_template.conf
of nginx/netshareweb_template.conf
to netshareweb.conf
Change variables wrapped with <>
in gunicorn_nginx.conf
to the correct value
HTTPS certificates can be placed in the nginx/
directory
Copy NGINX configuration file to the NGINX directory and reload NGINX
sudo cp netshareweb.conf /etc/nginx/conf.d/netshareweb.conf
sudo nginx -s reload