-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (36 loc) · 1001 Bytes
/
Makefile
File metadata and controls
52 lines (36 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
DOCKER_IMAGE ?= evcc/optimizer
DOCKER_TAG ?= latest
RESOURCE_GROUP ?= rg-optimizer-prod
default: build docker-build
build::
go generate ./...
install::
uv sync
upgrade::
uv lock --upgrade
lint::
uv run autopep8 --in-place --recursive .
uv run ruff check --fix
test::
uv run pytest
run::
uv run python -m optimizer.app
run-gunicorn::
uv run gunicorn --bind "0.0.0.0:7050" "optimizer.app:app"
loadtest::
uv run locust --host http://localhost:7050 --headless -t 30s -u 2 --only-summary
uv run locust --host http://localhost:7050 --headless -t 30s -u 4 --only-summary
docker: docker-build docker-push docker-run
docker-build::
docker buildx build . --tag $(DOCKER_IMAGE)
docker-run::
docker run -p 7050:7050 -it $(DOCKER_IMAGE)
docker-push::
docker push $(DOCKER_IMAGE)
fly::
fly deploy --local-only
deploy::
az deployment group create \
--resource-group $(RESOURCE_GROUP) \
--template-file infra/main.bicep \
--parameters containerImage=$(DOCKER_IMAGE):$(DOCKER_TAG)