From c3104ac1c74c7588aa12ae44ba47a8f730df17a5 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 22 Sep 2024 14:09:39 +0000 Subject: [PATCH] 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 --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ab5f641..20683ff 100644 --- a/Makefile +++ b/Makefile @@ -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