Could you please review these steps and advise if there is a way to refine them?, or if you have any other high-level implementation steps I could follow?
1- sudo apt update && sudo apt upgrade -y
2- sudo apt install -y python3 python3-pip python3-venv git postgresql postgresql-contrib nginx
3- sudo -u postgres psql
4- Created db and user
5- git clone https://github.com/usnistgov/NEMO.git
6- python3 -m venv venv
7-source venv/bin/activate
8- pip install --upgrade pip
Ā 9- Update the db in settings.py
database:
10- update the static path in settings.py
11- updated the db user permission:
ALTER SCHEMA public OWNER TO sql user;
ALTER SCHEMA public OWNER TO sql user;
Ā 12- install the following packages:Ā
sudo pip install django-filter --break-system-packages
sudo pip install django-mptt --break-system-packages
pip install django-mptt
pip install django-auditlog
pip install packaging
pip install drf-excel
pip install drf-flex-fields
pip install ldap3
pip install pymodbus
Ā
13- run python3 manage.py migrate
14- python manage.py createsuperuser
15-pip install gunicorn
gunicorn --workers 3 --bind 127.0.0.1:8001 NEMO.wsgi:application
Ā 16- sudo nano /etc/nginx/sites-available/nemo
server {
Ā Ā listen 80;
Ā Ā server_name localhost;
Ā Ā location = /favicon.ico { access_log off; log_not_found off; }
Ā Ā location /static/ {
Ā Ā Ā Ā alias
/home/nemo/NEMO/static/;
Ā Ā }
Ā Ā location / {
Ā Ā Ā Ā proxy_pass http://127.0.0.1:8001;
Ā Ā Ā Ā proxy_set_header Host $host;
Ā Ā Ā Ā proxy_set_header X-Real-IP $remote_addr;
Ā Ā }
}
Ā
18- sudo ln -s /etc/nginx/sites-available/nemo /etc/nginx/sites-enabled/
'
Your help will be highly appreciated itĀ
Ā