Update makefile
This commit is contained in:
18
Makefile
18
Makefile
@ -5,9 +5,11 @@ INTERNAL_WS_PORT=8011
|
|||||||
EXTERNAL_API_PORT=8010
|
EXTERNAL_API_PORT=8010
|
||||||
EXTERNAL_WS_PORT=8011
|
EXTERNAL_WS_PORT=8011
|
||||||
|
|
||||||
|
timestamp := `/bin/date "+%Y-%m-%d-%H-%M-%S"`
|
||||||
|
|
||||||
run:
|
run:
|
||||||
@poetry run \
|
@ \
|
||||||
|
poetry run \
|
||||||
uvicorn \
|
uvicorn \
|
||||||
main:app \
|
main:app \
|
||||||
--host 0.0.0.0 \
|
--host 0.0.0.0 \
|
||||||
@ -15,7 +17,8 @@ run:
|
|||||||
--workers=1
|
--workers=1
|
||||||
|
|
||||||
run-dev:
|
run-dev:
|
||||||
@poetry run \
|
@ \
|
||||||
|
poetry run \
|
||||||
uvicorn \
|
uvicorn \
|
||||||
main:app \
|
main:app \
|
||||||
--host 0.0.0.0 \
|
--host 0.0.0.0 \
|
||||||
@ -24,7 +27,8 @@ run-dev:
|
|||||||
--reload
|
--reload
|
||||||
|
|
||||||
create-requirements:
|
create-requirements:
|
||||||
@poetry export \
|
@ \
|
||||||
|
poetry export \
|
||||||
--without-hashes \
|
--without-hashes \
|
||||||
--format=requirements.txt \
|
--format=requirements.txt \
|
||||||
> requirements.txt
|
> requirements.txt
|
||||||
@ -37,15 +41,17 @@ docker-clean:
|
|||||||
|
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
@docker \
|
@ \
|
||||||
|
docker \
|
||||||
buildx build \
|
buildx build \
|
||||||
--build-arg INTERNAL_API_PORT=$(INTERNAL_API_PORT) \
|
--build-arg INTERNAL_API_PORT=$(INTERNAL_API_PORT) \
|
||||||
--build-arg INTERNAL_WS_PORT=$(INTERNAL_WS_PORT) \
|
--build-arg INTERNAL_WS_PORT=$(INTERNAL_WS_PORT) \
|
||||||
--tag $(CONTAINER_NAME) \
|
--tag $(CONTAINER_NAME):$(timestamp) \
|
||||||
.
|
.
|
||||||
|
|
||||||
docker-run:
|
docker-run:
|
||||||
@docker \
|
@ \
|
||||||
|
docker \
|
||||||
run \
|
run \
|
||||||
--publish $(EXTERNAL_API_PORT):$(INTERNAL_API_PORT) \
|
--publish $(EXTERNAL_API_PORT):$(INTERNAL_API_PORT) \
|
||||||
--publish $(EXTERNAL_WS_PORT):$(INTERNAL_WS_PORT) \
|
--publish $(EXTERNAL_WS_PORT):$(INTERNAL_WS_PORT) \
|
||||||
|
|||||||
Reference in New Issue
Block a user