Skip to content

Commit

Permalink
feat: updated fastapi and using fastapi-cli for dev/prod
Browse files Browse the repository at this point in the history
  • Loading branch information
TeKrop committed May 6, 2024
1 parent 2a6b666 commit 99ee0e8
Show file tree
Hide file tree
Showing 4 changed files with 388 additions and 101 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ build: ## Build project images

start: ## Run OverFastAPI application (dev mode)
@echo "Launching OverFastAPI (dev mode)..."
$(DOCKER_RUN) uvicorn app.main:app --reload --host 0.0.0.0
$(DOCKER_RUN) fastapi dev app/main.py --host 0.0.0.0

lint: ## Run linter
@echo "Running linter..."
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
build:
context: .
target: ${BUILD_TARGET:-main}
command: uvicorn app.main:app --host "0.0.0.0" --port 8080 --proxy-headers
command: fastapi run app/main.py --port 8080 --proxy-headers
env_file: ${APP_VOLUME_PATH:-.}/.env
volumes:
- ${APP_VOLUME_PATH:-/tmp}/app-logs:/code/logs
Expand Down
Loading

0 comments on commit 99ee0e8

Please sign in to comment.