Install and clone the repo using virtual environnement. See deploy section above
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
python manage.py collectstatic
Install new App : python manage.py startapp [name]
Edit files in outofbox-js Be sure to add symlinks cd outofbox-js ln -s ../../../outofbox-js vite ln -s ../../../outofbox-js/dist dist
When done, build vite : vite build
-
Install nginx and uwsgi your server
sudo apt update sudo apt install nginx uwsgi
-
Clone the repository of the project, usually located
/var/www/vhosts/outofbox
-
Ensure you have added the media folder and database file to the root project
-
Create a virtual environment using Python and install the required dependencies
python -venv /var/www/vhosts/outofbox
cd /var/www/vhosts/outofbox
source bin/activate
pip install -r requirements.txt
-
After this point, you can verify that everything works and perform migrations if needed
python manage.py runserver
-
(optional) Make sure that wsgi is running from the uWgsi endpoint if everything is working properly
uwsgi --http :5000 --wsgi-file outOfBox/wsgi.py
-
Enable nginx configuration by creating a configuration file, and then copying and editing the sample configuration file available here sample configuration file here
sudo nano /etc/nginx/sites-available/outofbox.com
-
Make sure all paths and domain names on the configuration file are correct, then restart NGINX
sudo service nginx restart
-
Update your DNS to point to your server IP address, and run uWGSI (using socket) to verify the setup.
uwsgi --socket outofbox.sock --wsgi-file outOfBox/wsgi.py --chmod-socket=666
-
Create a service and enable it to make the app run forever and copy file from here
sudo nano /etc/systemd/system/outofbox.service
sudo systemctl enable outofbox.service
sudo systemctl start outofbox.service