-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 755 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 755 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
38
39
MVN_REPO=${HOME}/.m2
CODE_BASE=${PWD}
IMAGE_TAG=usho:1.0
clean:
mvn clean
pack:
mvn package
dpack: clean
docker run --rm \
--volume ${MVN_REPO}:/root/.m2 \
--volume ${CODE_BASE}:/app \
--workdir /app s3vt/maven:latest mvn install
image: pack
docker build -t ${IMAGE_TAG} -f docker/usho/Dockerfile .
up: pack
docker compose --project-directory . -f docker/docker-compose.yaml up -d --build
down:
docker compose -f docker/docker-compose.yaml down
stop:
docker compose -f docker/docker-compose.yaml stop
logs:
docker compose -f docker/docker-compose.yaml logs --follow
usho:
curl -d '{longUrl: "google.com"}' \
-X POST \
-H 'Content-Type: application/json' \
http://localhost:4000/usho
getall:
curl http://localhost:4000/usho