chore: add target to handle database creation/migration
This commit is contained in:
13
Makefile
13
Makefile
@@ -1,6 +1,6 @@
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
COMPOSE = docker-compose -f docker-compose.yml -f docker-compose.override.yml
|
||||
COMPOSE = docker compose -f docker-compose.yml -f docker-compose.override.yml
|
||||
|
||||
.PHONY: setup
|
||||
setup: ## setup project
|
||||
@@ -36,6 +36,17 @@ compose_up: ## start containers for this service
|
||||
compose_test: ## run tests in containers
|
||||
@$(COMPOSE) run -e MIX_ENV=test --entrypoint make app test
|
||||
|
||||
.PHONY: compose_database_create
|
||||
compose_database_create:
|
||||
@$(COMPOSE) --profile setup run db_setup
|
||||
|
||||
.PHONY: compose_database_migrate
|
||||
compose_database_migrate: ## apply migrations to our database
|
||||
@$(COMPOSE) --profile migrate run db_migrate
|
||||
|
||||
.PHONY: compose_database_setup
|
||||
compose_database_setup: compose_database_create compose_database_migrate ## create and apply migrations
|
||||
|
||||
.PHONY: compose_ps
|
||||
compose_ps: ## status of containers
|
||||
@$(COMPOSE) ps
|
||||
|
Reference in New Issue
Block a user