-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathMakefile
46 lines (37 loc) · 1.08 KB
/
Makefile
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
# Makefile
ENV_VARS = \
ENVIRONMENT=local \
AWS_REGION=us-east-1 \
AWS_DEFAULT_REGION=us-east-1 \
AWS_ACCESS_KEY_ID=test \
AWS_SECRET_ACCESS_KEY=test \
AWS_ENDPOINT_URL=http://localhost:4566
start:
$(ENV_VARS) fastapi dev 'www/main.py' --host localhost --port 8080
.PHONY: start
start-localstack:
@docker compose --file docker/docker-compose-localstack.yml down --remove-orphans
@docker rm -f www-localstack 2>/dev/null || true
@docker compose --file docker/docker-compose-localstack.yml up -d localstack --force-recreate
.PHONY: start-localstack
create-db:
$(ENV_VARS) python -m scripts.create_db --s3 --db
.PHONY: create-db
create-staging-db:
ENVIRONMENT=staging python -m scripts.create_db --s3 --db
.PHONY: create-staging-db
create-production-db:
ENVIRONMENT=production python -m scripts.create_db --s3 --db
.PHONY: create-production-db
format:
@black www tests
@ruff check --fix www tests
.PHONY: format
lint:
@black --diff --check www tests
@ruff check www tests
@mypy --install-types --non-interactive www tests
.PHONY: lint
test:
@python -m pytest
.PHONY: test-backend