From 6ff6433be3c09c1687d0aa6e801bd68e080ffba1 Mon Sep 17 00:00:00 2001 From: Eden Kirin Date: Thu, 11 May 2023 21:39:26 +0200 Subject: [PATCH] Update makefile --- Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8ac702b..fedc677 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,11 @@ INTERNAL_WS_PORT=8011 EXTERNAL_API_PORT=8010 EXTERNAL_WS_PORT=8011 +timestamp := `/bin/date "+%Y-%m-%d-%H-%M-%S"` run: - @poetry run \ + @ \ + poetry run \ uvicorn \ main:app \ --host 0.0.0.0 \ @@ -15,7 +17,8 @@ run: --workers=1 run-dev: - @poetry run \ + @ \ + poetry run \ uvicorn \ main:app \ --host 0.0.0.0 \ @@ -24,7 +27,8 @@ run-dev: --reload create-requirements: - @poetry export \ + @ \ + poetry export \ --without-hashes \ --format=requirements.txt \ > requirements.txt @@ -37,15 +41,17 @@ docker-clean: docker-build: - @docker \ + @ \ + docker \ buildx build \ --build-arg INTERNAL_API_PORT=$(INTERNAL_API_PORT) \ --build-arg INTERNAL_WS_PORT=$(INTERNAL_WS_PORT) \ - --tag $(CONTAINER_NAME) \ + --tag $(CONTAINER_NAME):$(timestamp) \ . docker-run: - @docker \ + @ \ + docker \ run \ --publish $(EXTERNAL_API_PORT):$(INTERNAL_API_PORT) \ --publish $(EXTERNAL_WS_PORT):$(INTERNAL_WS_PORT) \