sudo apt update
sudo apt install redis-server python3-virtualenv
sudo systemctl restart redis.service
cd <project_folder>
virtualenv -p python3 .env
source .env/bin/activate
pip install -r requirements.txt --use-deprecated=legacy-resolver
python3 manage.py migrate
mkdir ../github_projects
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:8001
python manage.py flushqueue --queue default
python manage.py flushqueue --queue low
Next two commands in different shell tabs:
python manage.py rqscheduler
python manage.py rqworker default low
gunicorn -b 0.0.0.0:8001 config.wsgi --daemon
python manage.py flushqueue --queue default
python manage.py flushqueue --queue low
nohup python manage.py rqscheduler &
nohup python manage.py rqworker default low &
Install crontab on Prod to start the project after reboot automatically
@reboot sh $HOME/arielinstaller/bin/restart.sh
or in Docker
docker-compose up --build
docker-compose -f docker-compose.yml up --remove-orphans
docker image prune -f
docker container prune -f
Now you can access the project admin panel using the superuser created above by following URL:
http://127.0.0.1:8001/admin