-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathstart-apps.sh
executable file
·39 lines (31 loc) · 1.31 KB
/
start-apps.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
#!/usr/bin/env bash
source scripts/my-functions.sh
echo
echo "Starting store-api ..."
docker run -d --rm --name store-api -p 9080:8080 \
-e MYSQL_HOST=mysql \
--network springboot-kafka-connect-jdbc-streams_default \
--health-cmd="curl -f http://localhost:8080/actuator/health || exit 1" \
ivanfranchin/store-api:1.0.0
wait_for_container_log "store-api" "Started"
echo
echo "Starting store-streams ..."
docker run -d --rm --name store-streams -p 9081:8080 \
-e SPRING_PROFILES_ACTIVE=${1:-default} \
-e KAFKA_HOST=kafka -e KAFKA_PORT=9092 \
-e SCHEMA_REGISTRY_HOST=schema-registry \
--network springboot-kafka-connect-jdbc-streams_default \
--health-cmd="curl -f http://localhost:8080/actuator/health || exit 1" \
ivanfranchin/store-streams:1.0.0
wait_for_container_log "store-streams" "Started"
# ---
# In case you want 2 instances of store-streams running, uncomment the `docker run` below
# ---
#docker run -d --rm --name store-streams-2 -p 9082:8080 \
# -e SPRING_PROFILES_ACTIVE=${1:-default} \
# -e KAFKA_HOST=kafka -e KAFKA_PORT=9092 \
# -e SCHEMA_REGISTRY_HOST=schema-registry \
# --network springboot-kafka-connect-jdbc-streams_default \
# --health-cmd="curl -f http://localhost:8080/actuator/health || exit 1" \
# ivanfranchin/store-streams:1.0.0
# wait_for_container_log "store-streams-2" "Started"