Add new Makefile targets for logs and restart tasks
Extended the Makefile with new .PHONY targets: logs, logs-dev, restart, and restart-dev. These additions streamline viewing logs and restarting services for both production and development environments. Enhanced workflow efficiency by consolidating repetitive commands.
This commit is contained in:
20
Makefile
20
Makefile
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: dev prod down clean
|
.PHONY: dev prod down deploy push-images clean logs logs-dev restart restart-dev
|
||||||
|
|
||||||
VERSION ?= latest
|
VERSION ?= latest
|
||||||
REGISTRY := gitea.pragmazest.com/cardosofelipe/eventspace
|
REGISTRY := gitea.pragmazest.com/cardosofelipe/eventspace
|
||||||
@@ -24,4 +24,20 @@ push-images:
|
|||||||
docker build -t $(REGISTRY)/backend:$(VERSION) ./backend
|
docker build -t $(REGISTRY)/backend:$(VERSION) ./backend
|
||||||
docker build -t $(REGISTRY)/frontend:$(VERSION) ./frontend
|
docker build -t $(REGISTRY)/frontend:$(VERSION) ./frontend
|
||||||
docker push $(REGISTRY)/backend:$(VERSION)
|
docker push $(REGISTRY)/backend:$(VERSION)
|
||||||
docker push $(REGISTRY)/frontend:$(VERSION)
|
docker push $(REGISTRY)/frontend:$(VERSION)
|
||||||
|
|
||||||
|
logs:
|
||||||
|
docker compose logs -f
|
||||||
|
|
||||||
|
logs-dev:
|
||||||
|
docker compose -f docker-compose.dev.yml logs -f
|
||||||
|
|
||||||
|
restart:
|
||||||
|
docker compose down
|
||||||
|
docker compose up --build -d
|
||||||
|
docker compose logs -f
|
||||||
|
|
||||||
|
restart-dev:
|
||||||
|
docker compose -f docker-compose.dev.yml down
|
||||||
|
docker compose -f docker-compose.dev.yml up --build -d
|
||||||
|
docker compose -f docker-compose.dev.yml logs -f
|
||||||
|
|||||||
Reference in New Issue
Block a user