Skip to content

Commit

Permalink
Merge branch 'staging' into 10565-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlerza authored Dec 3, 2024
2 parents dbbf016 + cad9133 commit 51bf23f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions run-local.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
#!/bin/bash
# Used for running the API and necessary services (dynamo, s3, elasticsearch) locally

# Determine the docker compose invocation.
if command -v docker-compose &> /dev/null; then
DOCKER_COMPOSE="docker-compose"
else
DOCKER_COMPOSE="docker compose"
fi
# shellcheck disable=SC1091
. ./setup-local-env.sh

if [[ -z "$CI" ]]; then
echo "Stopping postgres in case it's already running"
docker compose -f web-api/src/persistence/postgres/docker-compose.yml down || true
$DOCKER_COMPOSE -f web-api/src/persistence/postgres/docker-compose.yml down || true

echo "Starting postgres"
docker compose -f web-api/src/persistence/postgres/docker-compose.yml up -d || { echo "Failed to start Postgres containers"; exit 1; }
$DOCKER_COMPOSE -f web-api/src/persistence/postgres/docker-compose.yml up -d || { echo "Failed to start Postgres containers"; exit 1; }

echo "Stopping dynamodb in case it's already running"
pkill -f DynamoDBLocal
Expand Down

0 comments on commit 51bf23f

Please sign in to comment.