Hi there. This repo has a few tutorial videos that will you get up and running quickly
- https://youtu.be/_9MbgyUvDGs - This will walk you through how to set up the project without Docker
- Clone this repo
git clone git@github.com:bobby-didcoding/did_django_schedule_jobs_v2.git
- Create your .env file from the template file
cp .env.template backend/.env
- Install 'Ubuntu' and set up Redis (https://www.youtube.com/watch?v=_nFwPTHOMIY)
- Download
Ubunto
fromwindows store
and launch app - create a username (must be an email) & password
- Now create redis repository
sudo apt-add-repository ppa:redislabs/redis
- Now update and upgrade packages
sudo apt-get update
thensudo apt-get upgrade
- Now install Redis
sudo apt-get install redis-server
- Create a
.env
file from the.env.template
and fill-in the environment variables specific to your setup (eg. DB name, user and password) - Save this into/backend
- Set up a virtual environment
cd backend && python -m venv env
- Activate virtual environment
cd env/scripts && activate && cd ../..
- Install dependencies for your local environment by running
pip install -r requirements/Local.txt
- Run
python manage.py migrate
- Open Ubuntu terminal and fire up a Redis server
redis-server
- Open another Ubuntu and set up a Redis CLI
redis-cli
- Open new cmd in root and use this command
celery -A did_django_schedule_jobs_v2.celery beat -l INFO
to fire up celery beat - Open new cmd in root and use this command
celery -A did_django_schedule_jobs_v2.celery worker --pool=solo -l info
to fire up a celery worker - Run
python manage.py runserver
- Clone from docker branch
git clone --branch docker git@github.com:bobby-didcoding/did_django_schedule_jobs_v2.git
- Create an env file
cp .env.template .env
- Update the DONOT_REPLY_EMAIL and GOOGLE_APP_PASSOWRD variables in the new .env file
cd backend && mkdir logs && cd logs && echo This is our celery log > celery.log && cd ../..
- Install Docker & Docker compose
- Compose a docker image
docker-compose -f docker-compose.yml up -d --build
- git config --global core.autocrlf input
- git config --global core.eol lf