Skip to content

Commit

Permalink
entrypoint: andys review
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Oct 2, 2024
1 parent b19fceb commit b5843be
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions docker/scripts/entrypoint-replication.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env bash

###############################################################################
# This a wrapper script for ppdb-replication which is intended to run in a
# Docker container. Configuration is managed by environment variables, which
# are defined in the Phalanx application, so that no command line arguments are
# required.
# This a wrapper script for the ppdb-replication script, intended to be as the
# entrypoint to a Docker container. Command line configuration is managed by
# environment variables, which are defined in the Phalanx application.
###############################################################################

# Bash "strict mode", to help catch problems and bugs in the shell script.
Expand Down Expand Up @@ -40,16 +39,9 @@ _CMD="$_CMD run"
[ -n "${PPDB_REPLICATION_MIN_WAIT_TIME:-}" ] && _CMD="$_CMD --min-wait-time $PPDB_REPLICATION_MIN_WAIT_TIME"
[ -n "${PPDB_REPLICATION_MAX_WAIT_TIME:-}" ] && _CMD="$_CMD --max-wait-time $PPDB_REPLICATION_MAX_WAIT_TIME"
[ -n "${PPDB_REPLICATION_CHECK_INTERVAL:-}" ] && _CMD="$_CMD --check-interval $PPDB_REPLICATION_CHECK_INTERVAL"
[ -n "${PPDB_REPLICATION_APDB_CONFIG:-}" ] && _CMD="$_CMD $PPDB_REPLICATION_APDB_CONFIG"
[ -n "${PPDB_REPLICATION_PPDB_CONFIG:-}" ] && _CMD="$_CMD $PPDB_REPLICATION_PPDB_CONFIG"
_CMD="$_CMD $PPDB_REPLICATION_APDB_CONFIG"
_CMD="$_CMD $PPDB_REPLICATION_PPDB_CONFIG"

# Run the command
echo "Running: $_CMD"
$_CMD

# Check the exit status of the command
status=$?
if [ $status -ne 0 ]; then
echo "Command failed with exit status $status"
exit $status
fi

0 comments on commit b5843be

Please sign in to comment.