Skip to content

Commit

Permalink
Add arg --db-port to docker/up.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Willy Lulciuc <[email protected]>
  • Loading branch information
wslulciuc committed Oct 31, 2024
1 parent 16aa5f4 commit 5d38425
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docker/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ usage() {
echo " -a, --api-port int api port (default: 5000)"
echo " -m, --api-admin-port int api admin port (default: 5001)"
echo " -w, --web-port int web port (default: 3000)"
echo " -d, --db-port int database port (default: 5432)"
echo " -e --search-port int search port (default: 9200)"
echo " -t, --tag string docker image tag (default: ${VERSION})"
echo " --args string docker arguments"
Expand All @@ -66,7 +67,7 @@ compose_files="-f docker-compose.yml"
API_PORT=5000
API_ADMIN_PORT=5001
WEB_PORT=3000
POSTGRES_PORT=5432
DB_PORT=5432
SEARCH_PORT=9200
NO_WEB="false"
NO_SEARCH="false"
Expand All @@ -89,9 +90,9 @@ while [ $# -gt 0 ]; do
shift
WEB_PORT="${1}"
;;
-p|'--pg-port')
-d|'--db-port')
shift
POSTGRES_PORT="${1}"
DB_PORT="${1}"
;;
-e|'--search-port')
shift
Expand Down Expand Up @@ -167,5 +168,5 @@ if [[ "${NO_SEARCH}" = "true" ]]; then
fi

# Run docker compose cmd with overrides
DOCKER_SCAN_SUGGEST="false" API_PORT=${API_PORT} API_ADMIN_PORT=${API_ADMIN_PORT} WEB_PORT=${WEB_PORT} POSTGRES_PORT=${POSTGRES_PORT} SEARCH_ENABLED=${SEARCH_ENABLED} SEARCH_PORT=${SEARCH_PORT} TAG=${TAG} \
DOCKER_SCAN_SUGGEST="false" API_PORT=${API_PORT} API_ADMIN_PORT=${API_ADMIN_PORT} WEB_PORT=${WEB_PORT} POSTGRES_PORT=${DB_PORT} SEARCH_ENABLED=${SEARCH_ENABLED} SEARCH_PORT=${SEARCH_PORT} TAG=${TAG} \
docker --log-level ERROR compose $compose_files up $compose_args

0 comments on commit 5d38425

Please sign in to comment.