Skip to content

Commit

Permalink
Docker script update (#12115)
Browse files Browse the repository at this point in the history
* Create manual.yml

* Fixing Typo

* Removing manual test github action file

* Testing IP runner

* Updating docker script for sandbox db task

* removing the ip test action

* Updating docker script for sandbox db task postgres

* Volume cleaning argument addition

* Volume cleaning argument addition
  • Loading branch information
Anuj359 authored and harshach committed Jun 28, 2023
1 parent e8ab389 commit 3d17160
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docker/development/docker-compose-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ services:
- 5432
ports:
- "5432:5432"
volumes:
- ./docker-volume/db-data-postgres:/var/lib/postgresql/data
networks:
- local_app_net
healthcheck:
Expand Down
2 changes: 2 additions & 0 deletions docker/development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ services:
interval: 15s
timeout: 10s
retries: 10
volumes:
- ./docker-volume/db-data:/var/lib/mysql

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.0
Expand Down
11 changes: 6 additions & 5 deletions docker/run_local_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ helpFunction()
printf "\t-s Skip maven build: [true, false]. Default [false]\n"
printf "\t-x Open JVM debug port on 5005: [true, false]. Default [false]\n"
printf "\t-h For usage help\n"
printf "\t-r For Cleaning DB Volumes"
printf "\t-r For Cleaning DB Volumes. [true, false]. Default [true]\n"
exit 1 # Exit script after printing help
}

while getopts "m:d:s:x:h" opt
while getopts "m:d:s:x:r:h" opt
do
case "$opt" in
m ) mode="$OPTARG" ;;
Expand All @@ -43,8 +43,9 @@ database="${database:=mysql}"
skipMaven="${skipMaven:=false}"
debugOM="${debugOM:=false}"
authorizationToken="eyJraWQiOiJHYjM4OWEtOWY3Ni1nZGpzLWE5MmotMDI0MmJrOTQzNTYiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzQm90IjpmYWxzZSwiaXNzIjoib3Blbi1tZXRhZGF0YS5vcmciLCJpYXQiOjE2NjM5Mzg0NjIsImVtYWlsIjoiYWRtaW5Ab3Blbm1ldGFkYXRhLm9yZyJ9.tS8um_5DKu7HgzGBzS1VTA5uUjKWOCU0B_j08WXBiEC0mr0zNREkqVfwFDD-d24HlNEbrqioLsBuFRiwIWKc1m_ZlVQbG7P36RUxhuv2vbSp80FKyNM-Tj93FDzq91jsyNmsQhyNv_fNr3TXfzzSPjHt8Go0FMMP66weoKMgW2PbXlhVKwEuXUHyakLLzewm9UMeQaEiRzhiTMU3UkLXcKbYEJJvfNFcLwSl9W8JCO_l0Yj3ud-qt_nQYEZwqW6u5nfdQllN133iikV4fM5QZsMCnm8Rq1mvLR0y9bmJiD7fwM1tmJ791TUWqmKaTnP49U493VanKpUAfzIiOiIbhg"
cleanDbVolumes="${cleanDbVolumes:=true}"

echo "Running local docker using mode [$mode] database [$database] and skipping maven build [$skipMaven]"
echo "Running local docker using mode [$mode] database [$database] and skipping maven build [$skipMaven] with cleanDB as [$cleanDbVolumes]"

cd ../

Expand Down Expand Up @@ -76,9 +77,9 @@ fi

if [[ $cleanDbVolumes == "true" ]]
then
if [[ -d "/docker-volume" ]]
if [[ -d "$PWD/docker/development/docker-volume/" ]]
then
rm -rf $PWD/docker-volume
rm -rf $PWD/docker/development/docker-volume
fi
fi

Expand Down

0 comments on commit 3d17160

Please sign in to comment.