This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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_ | ||
|
@@ -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 | ||
|
@@ -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 | ||
|