aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Harrison <paul@harrison.sh>2022-12-15 16:43:09 +0000
committerPaul Harrison <paul@harrison.sh>2023-05-16 10:22:26 +0100
commit6f3de3a8853243d302132083edefe3f87f60dc07 (patch)
tree7da56f0d93f7274fa1e7edefe5b7e98e79f9a442 /Makefile
parentaaea9c8aa3c7124599987ee14f88d51bcdadbcc2 (diff)
feat: Dockerize API
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 82bf93e..fc1c16d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ SHELL := /bin/bash
.PHONY: api
api: ## Run API
- @poetry run uvicorn poker.api:app
+ @poetry run uvicorn --host 0.0.0.0 poker.api:app
.PHONY: black
black: ## Run black formatter
@@ -13,6 +13,10 @@ black: ## Run black formatter
black-check: ## Run black formatter
@poetry run black poker tests --check;
+.PHONY: build
+build: ## Build Docker container
+ @COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f compose.yml build;
+
.PHONY: clean
clean: ## Remove python cache files
-@find . -name '*.pyc' -exec rm -f {} +;
@@ -79,4 +83,4 @@ uninstall: ## Remove virtual environment
.PHONY: update
update: ## Update poetry.lock using pyproject.toml
- @poetry update; \ No newline at end of file
+ @poetry update;