-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
44 lines (32 loc) · 1.14 KB
/
makefile
File metadata and controls
44 lines (32 loc) · 1.14 KB
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
38
39
40
41
42
43
44
SHELL := /bin/sh
VENV?=venv
ENV?=dev
BIN ?= $(VENV)/bin
PYTHON ?= $(BIN)/python
BASE_DIR = candidate-server
MESSAGE?=Migrating
API?=api
#include .env
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
make-migrate: ## Generate migration files
alembic revision --autogenerate -m '$(MESSAGE)'
migrate: ## runs the migrations
alembic upgrade head
docker-make-migrate: ## generate migrations for docker
docker exec -it $(API) alembic revision --autogenerate -m '$(MESSAGE)'
docker-migrate: ## runs the migrations for docker
docker exec -it $(API) alembic upgrade head
docker-migrate-base-downgrade: ## runs the migrations for docker
docker exec -it $(API) alembic downgrade base
up-build: ## builds the dockerfile and ups the services
docker-compose up -d --build
e2e-up: ## ups the docker services
docker-compose up -d
api-up: ## ups the api service
docker-composer up -d $(API)
test-async: ## tests asynchronously
docker exec -it api coverage run --concurrency=greenlet tests --test
teardown: ## tearsdown the docker services
docker-compose down