-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 739 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
include .env
export
prepare:
pip install -r requirements.txt
prepare-local:
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
services:
docker compose down
docker compose up -d postgresql
run:
make migrate-fail-safe
python -m uvicorn service.__main__:app --host 0.0.0.0 --port=${FASTAPI_PORT} --log-level=warning --reload &
run-worker:
make migrate-fail-safe
python -m worker
migrate:
cd migrations && python -m alembic upgrade head
migrate-fail-safe:
make upgrade || make upgrade || make upgrade || true
upgrade:
cd migrations && python -m alembic upgrade +1
downgrade:
cd migrations && python -m alembic downgrade -1
revision:
cd migrations && python -m alembic revision --autogenerate