Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: makefile recipe for deployment
Browse files Browse the repository at this point in the history
cmdoret committed Aug 30, 2024
1 parent 71b5337 commit cc185b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
REGISTRY="ghcr.io/sdsc-ordes"
IMAGE_NAME="modos-api"
LOCAL_IP := $(shell ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$$/\1/p')
VERSION :=$(shell grep -E '^version += +' pyproject.toml | sed -E 's/.*= +//')

.PHONY: install
@@ -34,6 +35,13 @@ test: ## Test the code with pytest
@echo "🚀 Testing code: Running pytest"
@poetry run pytest

.PHONY: deploy
deploy:
@echo "$(LOCAL_IP)";exit 0
@echo "🐋 Deploying server with docker compose"
cd deploy; S3_PUBLC_URL="http://$(LOCAL_IP):9000" docker compose up --build --force-recreate


.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

0 comments on commit cc185b3

Please sign in to comment.