Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
improves readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lowitea committed Dec 13, 2020
1 parent 90cdc75 commit 87a17f0
Showing 1 changed file with 71 additions and 5 deletions.
76 changes: 71 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ Code quality:
1. Issue tracker: [https://github.com/Uma-Tech/parrot/issues](https://github.com/Uma-Tech/parrot/issues)
1. Changelog: [https://github.com/Uma-Tech/parrot/blob/develop/CHANGELOG.md](https://github.com/Uma-Tech/parrot/blob/develop/CHANGELOG.md)

## Quickstart
## Quickstart (with Docker)
1. Clone the repo
```shell script
```shell
git clone [email protected]:Uma-Tech/parrot.git
```

1. Build or download the docker image
_for build_
```shell script
```shell
make build
```
_for download_
Expand All @@ -47,7 +47,7 @@ Code quality:
```

1. Apply migrations and create a superuser:
```shell script
```shell
make shell
# inside the container
python manage.py migrate # apply migrations
Expand All @@ -56,22 +56,88 @@ Code quality:
```

1. Start app with required services
```shell script
```shell
make runserver
```

1. Service will be available at `http://127.0.0.1:8042/`

## Start the project for developing without Docker
1. Clone the repo and go to the project directory
```shell
git clone [email protected]:Uma-Tech/parrot.git && \
cd parrot
```

1. Install dependencies
```shell
poetry install
```

1. Start databases
_You can start databases in any other way_
```shell
# 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
```

1. Setting require environment variables
_Alternative, you can create a local `.env` file with the variables_
```shell
export PARROT_DB_HOST=127.0.0.1
```

1. Apply database migrations
```shell
poetry run python manage.py migrate
```

1. Create a django superuser
```shell
poetry run python manage.py createsuperuser
```

1. Start the django app
```shell
poetry run python manage.py runserver
```

1. Start the celery worker
_Run in a separate terminal window_
```shell
poetry run celery -A parrot worker -l INFO
```


## System requires
* docker ([https://www.docker.com/](https://www.docker.com/))
* docker-compose
([https://github.com/docker/compose](https://github.com/docker/compose))
* make
([https://www.gnu.org/software/make/](https://www.gnu.org/software/make/))
_(all commands can be viewed by calling `make` without parameters)_
* poetry _(for developing)_
([https://python-poetry.org/](https://python-poetry.org/))

## Components
1. Database postgres.
1. Database redis (for background celery-tasks).
1. Python-app based on Django Web Framework.

## Contributing
Expand Down

0 comments on commit 87a17f0

Please sign in to comment.