-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathsystemtest-run-dev-env.sh
executable file
·51 lines (39 loc) · 1.17 KB
/
systemtest-run-dev-env.sh
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
#!/bin/bash
set -euo pipefail
cd ${0%/*}/coffee-shop
trap cleanup EXIT
function cleanup() {
echo stopping containers
docker stop coffee-shop coffee-shop-db barista &> /dev/null || true
}
cleanup
docker run -d --rm \
--name coffee-shop-db \
--network dkrnet \
-p 5432:5432 \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
postgres:9.5
docker run -d --rm \
--name barista \
--network dkrnet \
-p 8002:8080 \
rodolpheche/wiremock:2.6.0
# coffee-shop
mvn clean package -Dquarkus.package.type=mutable-jar
docker build -t coffee-shop:tmp .
docker run -d \
--name coffee-shop \
--network dkrnet \
-e QUARKUS_LAUNCH_DEVMODE=true \
-p 8001:8080 \
-p 5005:5005 \
coffee-shop:tmp \
java -jar \
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" \
-Dquarkus.live-reload.password=123 \
-Dquarkus.http.host=0.0.0.0 \
/deployments/quarkus-run.jar
# wait for app startup
wget --quiet --tries=30 --waitretry=2 --retry-connrefused -O /dev/null http://localhost:8001/q/health
mvn quarkus:remote-dev -Ddebug=false -Dquarkus.live-reload.url=http://localhost:8001 -Dquarkus.live-reload.password=123 -Dquarkus.package.type=mutable-jar