Local run
Quickstart (with Docker)
-
Clone the repo
git clone git@github.com:Uma-Tech/parrot.git cd parrot
-
Build or download the docker image
for buildmake build
for download
docker pull umahighload/parrot-app:latest
-
Apply migrations and create a superuser:
make shell # inside the container python manage.py migrate # apply migrations python manage.py createsuperuser # create a superuser exit ## leave from the container
-
Start the app and its dependencies
make runserver
-
You will be able to access the service at
http://127.0.0.1:8042/
Start the project for development without Docker
-
Clone the repo and go to the project directory
git clone git@github.com:Uma-Tech/parrot.git cd parrot
-
Install dependencies
poetry install
-
Start databases
You can start databases in any other way# start postgres docker run \ --name postgres \ -d \ --rm \ -e POSTGRES_PASSWORD=parrot \ -e POSTGRES_USER=parrot \ --network host \ -v parrot_db:/var/lib/postgresql/data \ postgres # start redis docker run \ --name redis \ -d \ --rm \ --network host \ redis
-
Setting required environment variables
export PARROT_DB_HOST=127.0.0.1 export PARROT_SECRET_KEY=NO_SECRET export PARROT_CELERY_BROKER_URL=redis://127.0.0.1
Alternatively, you can create a local
.env
file with the variables -
Build static
poetry run python manage.py collectstatic --no-input
-
Apply database migrations
poetry run python manage.py migrate
-
Create a django superuser
poetry run python manage.py createsuperuser
-
Start the django app
poetry run python manage.py runserver
-
Start the celery worker
Run in a separate terminal windowpoetry run celery -A parrot worker -l INFO -c 4