-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.04 KB
/
Makefile
File metadata and controls
54 lines (41 loc) · 1.04 KB
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
53
54
test:
hurl --test script.hurl
testdelete:
hurl --test delete.hurl
dev:
docker compose -f docker-compose.dev.yml up --build
prod:
docker compose up --build
down:
docker compose -f docker-compose.dev.yml down -v
wait-for-db:
@echo "Waiting to database to be ready..."
@until docker exec tpespecial_db pg_isready -U user -d mydatabase_dev; do \
sleep 1; \
done
@echo "Database is ready!"
wait-for-building:
@echo "Esperando que la API esté disponible..."
@until curl -s http://localhost:8080/health >/dev/null; do \
printf '.'; \
sleep 2; \
done
@echo "\nAPI lista!"
testdev:
docker compose -f docker-compose.dev.yml up -d --build
make wait-for-db
make wait-for-building
hurl --test script.hurl
templ:
go run github.com/a-h/templ/cmd/templ@latest generate
sqlc:
go run github.com/sqlc-dev/sqlc/cmd/sqlc@latest generate
users:
curl -X GET http://localhost:8080/users
generate:
make templ
make sqlc
health:
@curl -f http://localhost:8080/health
db_console:
docker exec -it tpespecial_db psql -U admin -d tpespecialweb