initial commit
This commit is contained in:
38
Makefile
Normal file
38
Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
args := $(wordlist 2, 100, $(MAKECMDGOALS))
|
||||
ifndef args
|
||||
MESSAGE = "No such command (or you pass two or many targets to ). List of possible commands: make help"
|
||||
else
|
||||
MESSAGE = "Done"
|
||||
endif
|
||||
|
||||
API_APPLICATION_NAME = api
|
||||
|
||||
services:
|
||||
docker-compose -f docker-compose.yaml up -d --remove-orphans
|
||||
|
||||
start-api:
|
||||
cd api && \
|
||||
source .venv/bin/activate && \
|
||||
python -m ${API_APPLICATION_NAME}
|
||||
|
||||
start-client:
|
||||
cd client && \
|
||||
npm start
|
||||
|
||||
migrate:
|
||||
cd api && \
|
||||
source .venv/bin/activate && \
|
||||
cd $(API_APPLICATION_NAME)/db && \
|
||||
PYTHONPATH='../..' ALEMBIC_MIGRATIONS=True alembic upgrade $(args)
|
||||
|
||||
downgrade:
|
||||
cd api && \
|
||||
source .venv/bin/activate && \
|
||||
cd $(API_APPLICATION_NAME)/db && \
|
||||
PYTHONPATH='../..' alembic downgrade -1
|
||||
|
||||
revision:
|
||||
cd api && \
|
||||
source .venv/bin/activate && \
|
||||
cd $(API_APPLICATION_NAME)/db && \
|
||||
PYTHONPATH='../..' ALEMBIC_MIGRATIONS=True alembic revision --autogenerate
|
Reference in New Issue
Block a user