-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker_run-local.sh
79 lines (71 loc) · 2.37 KB
/
docker_run-local.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# - env/deployment/scripts/docker_run.shのデバック用スクリプト
# - 内容はdocker-compose.ymlと同じなので普段はdocker-composeを使う方が便利
END_STATUS=0
# Create docker network
docker network create -d bridge msa-apigateway-network || {
echo "msa-apigateway-network create fail error:$?" && END_STATUS=1
}
# Start msa-apigateway
docker run -d \
-p 7001:7001 \
-p 7011:7011 \
-e ENV_RMS_SERVICE_URL_ITEM=http://msa-service-item:7002 \
-e ENV_RMS_SERVICE_URL_RESERVATION=http://msa-service-reservation:7003 \
-e ENV_RMS_SERVICE_URL_USER=http://msa-service-user:7004 \
-e TZ=Asia/Tokyo \
-e TRACING_ENABLED=true \
-e TRACING_HOST=jaeger \
--name msa-apigateway --rm \
--network msa-apigateway-network \
extact-io/msa-apigateway:latest || {
echo "msa-apigateway start fail error:$?" && END_STATUS=1
}
# Start msa-service-item
docker run -d \
-e TZ=Asia/Tokyo \
-e TRACING_ENABLED=true \
-e TRACING_HOST=jaeger \
--name msa-service-item --rm \
--network msa-apigateway-network \
extact-io/msa-service-item:latest || {
echo "msa-service-item start fail error:$?" && END_STATUS=1
}
# Start msa-service-reservation
docker run -d \
-e ENV_RMS_SERVICE_URL_ITEM=http://msa-service-item:7002 \
-e ENV_RMS_SERVICE_URL_USER=http://msa-service-user:7004 \
-e TZ=Asia/Tokyo \
-e TRACING_ENABLED=true \
-e TRACING_HOST=jaeger \
--name msa-service-reservation --rm \
--network msa-apigateway-network \
extact-io/msa-service-reservation:latest || {
echo "msa-service-reservation start fail error:$?" && END_STATUS=1
}
# Start msa-service-user
docker run -d \
-e TZ=Asia/Tokyo \
-e TRACING_ENABLED=true \
-e TRACING_HOST=jaeger \
--name msa-service-user --rm \
--network msa-apigateway-network \
extact-io/msa-service-user:latest || {
echo "msa-service-user start fail error:$?" && END_STATUS=1
}
# Start jaeger
docker run -d --name jaeger \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-e COLLECTOR_OTLP_ENABLED=true \
-p 6831:6831/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14250:14250 \
-p 14268:14268 \
-p 9411:9411 \
--name jaeger --rm \
--network msa-apigateway-network \
jaegertracing/all-in-one:1.39 || {
echo "jaeger start fail error:$?" && END_STATUS=1
}
exit $END_STATUS