-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (37 loc) · 1.22 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
47
48
test:
FASTQUEUE_TESTING='true' poetry run pytest -v
lint:
poetry run pre-commit run --all-files
run-db:
docker run --name postgres-fastqueue \
--restart unless-stopped \
-e POSTGRES_USER=fastqueue \
-e POSTGRES_PASSWORD=fastqueue \
-e POSTGRES_DB=fastqueue \
-p 5432:5432 \
-d postgres:15-alpine
rm-db:
docker kill $$(docker ps -aqf name=postgres-fastqueue)
docker container rm $$(docker ps -aqf name=postgres-fastqueue)
run-test-db:
docker run --name postgres-fastqueue-test \
--restart unless-stopped \
-e POSTGRES_USER=fastqueue \
-e POSTGRES_PASSWORD=fastqueue \
-e POSTGRES_DB=fastqueue-test \
-p 5432:5432 \
-d postgres:15-alpine
rm-test-db:
docker kill $$(docker ps -aqf name=postgres-fastqueue-test)
docker container rm $$(docker ps -aqf name=postgres-fastqueue-test)
build-image:
docker build --rm -t fastqueue .
run-server:
poetry run python fastqueue/main.py server
run-db-migrate:
poetry run python fastqueue/main.py db-migrate
run-worker:
poetry run python fastqueue/main.py worker
create-auto-migration:
poetry run alembic revision --autogenerate -m "Auto generated"
.PHONY: test lint run-db rm-db run-test-db rm-test-db build-image run-server run-db-migrate run-worker create-auto-migration