-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (17 loc) · 861 Bytes
/
Makefile
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
start: ## Start project containers defined in docker-compose
docker-compose up -d
create-migration: start ## Autogenerate an alembic migration
docker-compose run backend alembic revision --autogenerate -m "$(migration-name)"
migrate: recreate start ## Apply the latest migrations
docker-compose run backend alembic upgrade head
psql: start ## Connect to the db
docker-compose run db psql -h db -d test_db -U postgres
stop: ## Stop project containers defined in docker-compose
docker-compose stop
destroy: ## Destroy all project containers
docker-compose down -v --rmi local --remove-orphans
clean: ## Delete all volumes, networks, images & cache
docker system prune -a --volumes
test: start ## Run tests and generate coverage report
docker-compose run backend pytest
recreate: destroy start ## Destroy project containers and start them again