framework/Makefile

45 lines
1.3 KiB
Makefile
Raw Normal View History

2024-10-12 02:52:22 +03:00
.PHONY: dev-infra-up
dev-infra-up:
docker compose -f ./contrib/dev/docker-compose.yml up -d
.PHONY: dev-infra-stop
dev-infra-stop:
docker compose -f ./contrib/dev/docker-compose.yml stop
.PHONY: dev-infra-down
dev-infra-down:
docker compose -f ./contrib/dev/docker-compose.yml down
.PHONY: generate
generate:
go generate ./...
templ generate
.PHONY: tidyvendor
tidyvendor:
go mod tidy
go mod vendor
.PHONY: init-dev
init-dev:
go run ./cmd/app db init --config ./etc/dev.yaml
.PHONY: migrate-dev
migrate-dev:
go run ./cmd/app db migrate --config ./etc/dev.yaml
.PHONY: rollback-dev
rollback-dev:
go run ./cmd/app db rollback --config ./etc/dev.yaml
.PHONY: init-prod
init-prod:
go run ./cmd/app db init --config ./etc/prod.yaml
.PHONY: migrate-prod
migrate-prod:
go run ./cmd/app db migrate --config ./etc/prod.yaml
.PHONY: rollback-prod
rollback-prod:
go run ./cmd/app db rollback --config ./etc/prod.yaml
# .PHONY: deploy
# deploy: generate
# docker build -t gitrepo.ru/neonxp/shorg:latest .
# docker push gitrepo.ru/neonxp/shorg:latest
# docker context use curie
# docker compose -f ./contrib/prod/docker-compose.yml --project-name shorg pull app
# docker compose -f ./contrib/prod/docker-compose.yml --project-name shorg up --force-recreate --build -d
# docker image prune -f
# docker context use default