-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathup_docker_services.sh
More file actions
executable file
·34 lines (27 loc) · 939 Bytes
/
up_docker_services.sh
File metadata and controls
executable file
·34 lines (27 loc) · 939 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
#!/bin/bash
echo "### Stop running docker-compose ###"
docker-compose down
echo "### Stop and remove containers ###"
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
if [ "$1" = "build" ]; then
echo "### Build all containers ###"
echo "### Build frontend ###"
sh ./client_docker_build.sh || exit 1
services=("rococo-auth" "rococo-gateway" "rococo-userdata" "rococo-country" "rococo-museum" "rococo-artist" "rococo-painting")
for service in "${services[@]}"; do
echo "### remove local image for $service###"
docker rmi "koctuk999/$service"
if [ "$2" = "push" ]; then
echo "### Build & push images for $service ###"
bash ./gradlew ":$service:jib" || exit 1
else
echo "### Build local images for $service ###"
bash ./gradlew ":$service:jibDockerBuild" || exit 1
fi
done
else
echo "### Skip build ###"
fi
echo "### Start docker-compose ###"
docker-compose up -d