# Define variables
DOCKER_COMPOSE=docker-compose
CONTAINER_NAME=my_laravel_app
COMMAND=php artisan

# Default target
all: up

# Start services
up:
	sudo $(DOCKER_COMPOSE) up -d

# Stop and remove services
down:
	sudo $(DOCKER_COMPOSE) down

# Run command inside the container
run:
	sudo docker exec -it $(CONTAINER_NAME) $(c)

# Example target to seed the database
db-seed:
	sudo docker exec -it $(CONTAINER_NAME) $(COMMAND) db:seed

bash:
	sudo docker exec -it $(CONTAINER_NAME) bash
