chore: improve make targets

1. Remove deps upgrade, since we're using the watch definition
2. In it's place add target to start services with watch option
3. Adjust ecto interaction to run command directly
4. Remove tests for now because the folder isn't synced in the image
This commit is contained in:
João Paulo Dubas 2024-09-22 14:09:39 +00:00
parent fe32f3f207
commit c3104ac1c7
No known key found for this signature in database

View File

@ -32,21 +32,17 @@ test: ## run tests
compose_up: ## start containers for this service
@$(COMPOSE) up -d
.PHONY: compose_deps_upgrade
compose_deps_upgrade: ## install/upgrade deps
@$(COMPOSE) run --entrypoint mix app do deps.get, deps.compile, compile
.PHONY: compose_test
compose_test: ## run tests in containers
@$(COMPOSE) run -e MIX_ENV=test --entrypoint make app test
.PHONY: compose_watch
compose_watch: ## start containers for this service watching for updates in filesystem
@$(COMPOSE) up -w
.PHONY: compose_database_create
compose_database_create:
@$(COMPOSE) --profile setup run db_setup
@$(COMPOSE) run --rm --entrypoint mix app ecto.create
.PHONY: compose_database_migrate
compose_database_migrate: ## apply migrations to our database
@$(COMPOSE) --profile migrate run db_migrate
@$(COMPOSE) run --rm --entrypoint mix app ecto.migrate
.PHONY: compose_database_setup
compose_database_setup: compose_database_create compose_database_migrate ## create and apply migrations