#!make
SHELL := /bin/bash

include .env

.PHONY: help build test up down exec clean

help: ## Help command
	@echo
	@cat Makefile | grep -E '^[a-zA-Z\/_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
	@echo

build: ## Build the docker image
	docker compose build

utils: ## Start the utils
	docker compose up -d db
	docker compose up -d redis
	docker compose up -d minio

up: ## Start the app
	docker compose up -d

down: ## Stop the app
	docker compose down

clean:
	docker compose down && \
	docker image rm siren-service || \
	docker network rm siren_frontend || \
	docker network rm siren-backend