From within project directory:
Build and start : $ docker-compose up -d --build
Live logs : $ docker-compose logs -f
Stop : $ docker-compose down
First time running?
$ docker-compose exec backend aerich init-db
Success create app migrate location migrations/models
Success generate schema for app "models"
Made changes to the models?
$ docker-compose exec backend aerich migrate
$ docker-compose exec backend aerich upgrade
Want a python interpreter?
$ docker exec -it backend ipython
Want to connect to db?
$ docker-compose exec db psql --username=postgres_user --dbname=db
!! YOU must manully create your own .env file for the following services...or adding them do docker-compose.yml environment:
/backend/.env:
POSTGRES_USER=postgres_user
POSTGRES_PASSWORD=some_password
POSTGRES_DB=db
SECRET_KEY=some_secret_key
/db/.env:
POSTGRES_USER=postgres_user
POSTGRES_PASSWORD=some_password
POSTGRES_DB=db
/notifier/.env:
TELEGRAM_CHAT_ID=some_number
TELEGRAM_TOKEN=some_code
/scheduler/.env:
BINANCE_API_KEY=some_code
BINANCE_API_SECRET=some_secret
HUEY_DB=/tmp/huey.db
- secret keys can be generated with : openssl rand -hex 32