-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (35 loc) · 1.28 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
49
50
node:
docker run -p 3000:3000 --mount type=bind,source=$(CURDIR)/app/src,target=/app --name node node:latest
build:
docker build -t mynode:latest ./
mynode:
docker run -d -p 3000:3000 --mount type=bind,source=$(CURDIR)/app,target=/app --name mynode mynode:latest
mysql:
docker run -d -e MYSQL_ROOT_PASSWORD=root --mount type=bind,source=$(CURDIR)/db,target=/var/lib/mysql --name db mysql:latest
mysqlsh:
docker exec -it db bash
rm:
docker rm mynode
dcup:
docker compose up -d $1
dcstop:
docker compose stop
dcbash:
docker compose exec -it mynode bash
dcrm:
docker compose rm -f mynode nginx db
ndb:
mysql -h 127.0.0.1 -P 3306 -u root -p
dclogs:
docker compose logs $1
prune:
docker system prune -af
test-post:
curl --request POST localhost:8080/people && echo
curl -d '[{"name":"persike"}, {"name":"thorSM"}]' -H "Content-Type: application/json" -X POST http://localhost:8080/people && echo
curl -d '{ "name": "persike", "age": "18" }' -H "Content-Type: application/json" -X POST http://localhost:8080/people && echo
curl -d '{}' -H "Content-Type: application/json" -X POST http://localhost:8080/people && echo
curl -d '[]' -H "Content-Type: application/json" -X POST http://localhost:8080/people && echo
test-get:
curl localhost:8080/ && echo
curl localhost:8080/people && echo