-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (23 loc) · 846 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (23 loc) · 846 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
.PHONY: run docker-up
api:
go run cmd/api/main.go
worker:
go run cmd/worker/main.go
docker-up:
docker compose up -d
run: docker-up
import-users:
go run cmd/cli/main.go import https://raw.githubusercontent.com/OtusTeam/highload/master/homework/people.v2.csv 10
dummy-data: import-users
@echo "Creating dummy user..."
@ID=$$(curl -s -X POST 'http://api.localhost/user/register' \
--header 'Content-Type: application/json' \
--data '{"first_name":"Имя","second_name":"Фамилия","birthdate":"2017-02-01","biography":"Хобби, интересы и т.п.","city":"Москва","password":"password"}' \
| grep -o '"id":"[^"]*"' | cut -d'"' -f4); \
echo ""; \
go run ./cmd/cli addRandomFriendsWithPosts $$ID 10; \
echo "{"; \
echo " \"id\": \"$$ID\","; \
echo " \"password\": \"password\""; \
echo "}"; \
echo "";