-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset-env.sh
More file actions
executable file
·28 lines (25 loc) · 867 Bytes
/
reset-env.sh
File metadata and controls
executable file
·28 lines (25 loc) · 867 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
#!/bin/bash
docker compose down;
docker container list -a | grep wtc | tr -s ' ' | cut -d' ' -f 1 | xargs docker container stop;
docker container list -a | grep wtc | tr -s ' ' | cut -d' ' -f 1 | xargs docker container rm;
docker image ls | tr -s ' ' | grep wtc | cut -d' ' -f 3 | xargs docker image rm;
rm -rf ./volumes/data;
sleep 5;
docker compose up -d;
if [ "$?" != "0" ]; then
echo "ERROR: Failed to start all required containers";
exit 1
fi
#########################
# Add your scripting here
#########################
echo "waiting for debezium container to initialize..."
sleep 40;
curl --request POST \
--url http://localhost:8083/connectors \
--header 'Content-Type: application/json' \
--data @./volumes/config/debezium/source_config.json
if [ "$?" != "0" ]; then
echo "ERROR: Failed to register connector";
exit 1
fi