-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 863 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (26 loc) · 863 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
export COMPOSE_BAKE=true
DB_URL=postgresql://postgres:postgres@localhost:5432/zlagoda?sslmode=disable
.PHONY: up down test migrate-all-up migrate-all-down create-migration test-all test-unit test-integration seed-up
up:
docker compose up --build
down:
docker compose down
test:
curl http://localhost:8080
curl http://localhost:8081
migrate-all-up:
migrate -path migrations -database "${DB_URL}" up
migrate-all-down:
migrate -path migrations -database "${DB_URL}" down
create-migration:
migrate create -ext sql -dir migrations -seq $(name)
test-all:
bash test.sh
test-unit:
bash test.sh test-unit
test-integration:
bash test.sh test-integration
seed-up:
docker exec -i postgres-db psql -U postgres -d zlagoda < scripts/fill_test_data.up.sql
seed-down:
docker exec -i postgres-db psql -U postgres -d zlagoda < scripts/fill_test_data.down.sql