-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
17 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,34 +9,27 @@ dev: | |
run: | ||
uv run gunicorn -w 4 -b 0.0.0.0:$(PORT) app.server:app | ||
|
||
start: | ||
make stop rm || true | ||
docker run -p $(PORT):$(PORT) data-charts-api make run | ||
|
||
build: | ||
docker build . --tag=data-charts-api | ||
|
||
start: | ||
-docker stop data-charts-api | ||
-docker rm data-charts-api | ||
docker run -d --name data-charts-api -p $(PORT):$(PORT) data-charts-api | ||
|
||
stop: | ||
docker stop data-charts-api | ||
-docker stop data-charts-api | ||
|
||
rm: | ||
docker rm data-charts-api | ||
-docker rm data-charts-api | ||
|
||
bash: | ||
docker run --rm -it data-charts-api bash | ||
|
||
PID_FILE = server.pid | ||
|
||
test: | ||
env PORT=$(PORT) DATABASE_URL=postgres://student:[email protected]:5432/chartsdb \ | ||
make dev & echo $$! > $(PID_FILE) && \ | ||
sleep 2 && \ | ||
uv run pytest; \ | ||
status=$$?; \ | ||
if [ -f $(PID_FILE) ]; then kill `cat $(PID_FILE)` && rm $(PID_FILE); fi; \ | ||
exit $$status | ||
uv run pytest | ||
|
||
lint: | ||
uv run ruff check . | ||
|
||
check: test lint | ||
check: lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.