Add deployment and image push support to Makefile
Introduced a new `deploy` target for deploying services and a `push-images` target for building and pushing Docker images. Added a default `VERSION` and `REGISTRY` variable for streamlined image tagging and registry management. Included a `docker-compose.deploy.yml` file for deployment configuration.
This commit is contained in:
16
Makefile
16
Makefile
@@ -1,5 +1,9 @@
|
||||
.PHONY: dev prod down clean
|
||||
|
||||
VERSION ?= latest
|
||||
REGISTRY := gitea.pragmazest.com/cardosofelipe/eventspace
|
||||
|
||||
|
||||
dev:
|
||||
docker compose -f docker-compose.dev.yml up --build -d
|
||||
|
||||
@@ -9,5 +13,15 @@ prod:
|
||||
down:
|
||||
docker compose down
|
||||
|
||||
deploy:
|
||||
docker compose -f docker-compose.deploy.yml pull
|
||||
docker compose -f docker-compose.deploy.yml up -d
|
||||
|
||||
clean:
|
||||
docker compose down -v
|
||||
docker compose down -
|
||||
|
||||
push-images:
|
||||
docker build -t $(REGISTRY)/backend:$(VERSION) ./backend
|
||||
docker build -t $(REGISTRY)/frontend:$(VERSION) ./frontend
|
||||
docker push $(REGISTRY)/backend:$(VERSION)
|
||||
docker push $(REGISTRY)/frontend:$(VERSION)
|
||||
0
docker-compose.deploy.yml
Normal file
0
docker-compose.deploy.yml
Normal file
Reference in New Issue
Block a user