2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-22 10:10:12 +00:00

Fix issues pertaining to running env

- Add `debug` flag to `sbt.sh`
- Remove need for `LOCALSTACK_EXT_HOSTNAME` (provided by update to
backing Docker images)
This commit is contained in:
Ryan Emerle 2022-01-31 13:40:45 -05:00
parent f25a95a24e
commit 08587fe1be
No known key found for this signature in database
GPG Key ID: C0D34C592AED41CE
6 changed files with 37 additions and 6 deletions

1
.gitignore vendored
View File

@ -36,3 +36,4 @@ quickstart/data
**/.venv*
**/*cache*
**/artifacts/
**/.env.overrides

View File

@ -3,5 +3,35 @@ set -euo pipefail
DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
usage() {
echo "USAGE: sbt.sh [options]"
echo -e "\t-d, --debug enable debugging"
echo -e "\t-p, --debug-port the debug port (default: 5021)"
}
DEBUG_SETTINGS=""
DEBUG_PORT=5021
while [[ $# -gt 0 ]]; do
case "$1" in
--debug | -d)
DEBUG_SETTINGS="-e SBT_OPTS=\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n"
shift
;;
--debug-port | -p)
DEBUG_PORT=$2
shift
shift
;;
*)
usage
exit 1
;;
esac
done
if [ "${DEBUG_SETTINGS}" != "" ]; then
DEBUG_SETTINGS="${DEBUG_SETTINGS},address=${DEBUG_PORT}\" -p \"${DEBUG_PORT}:${DEBUG_PORT}\""
fi
cd "$DIR/../test/api/integration"
make build DOCKER_PARAMS="--build-arg SKIP_API_BUILD=true" && make run-local WITH_ARGS="sbt" DOCKER_PARAMS="-e RUN_SERVICES=none --env-file \"$DIR/../test/api/integration/.env.integration\""
make build DOCKER_PARAMS="--build-arg SKIP_API_BUILD=true" && make run-local WITH_ARGS="sbt" DOCKER_PARAMS="-p \"5020-5030:5020-5030\" ${DEBUG_SETTINGS} -e RUN_SERVICES=none --env-file \"$DIR/../test/api/integration/.env.integration\""

View File

@ -85,16 +85,17 @@ class SnsNotifierIntegrationSpec
val sns = AmazonSNSClientBuilder.standard
.withEndpointConfiguration(
new EndpointConfiguration(
snsConfig.getString("service-endpoint"),
sys.env.getOrElse("SNS_SERVICE_ENDPOINT", snsConfig.getString("service-endpoint")),
snsConfig.getString("signing-region")
)
)
.withCredentials(credentialsProvider)
.build()
val sqs = AmazonSQSClientBuilder
.standard()
.withEndpointConfiguration(
new EndpointConfiguration(sys.env.getOrElse("SNS_SERVICE_ENDPOINT", "http://127.0.0.1:19003"), "us-east-1")
new EndpointConfiguration(sys.env.getOrElse("SQS_SERVICE_ENDPOINT", "http://127.0.0.1:19003"), "us-east-1")
)
.withCredentials(credentialsProvider)
.build()

View File

@ -6,6 +6,7 @@ VINYLDNS_PORTAL_URL=http://localhost:9001
PORTAL_PORT=9001
PLAY_HTTP_SECRET_KEY=change-this-for-prod
VINYLDNS_BACKEND_URL=http://vinyldns-api:9000
# VINYLDNS_BACKEND_URL=http://host.docker.internal:9000 # You can use this when the API is running locally, but the portal is in a container
LDAP_PROVIDER_URL=ldap://vinyldns-ldap:19004
TEST_LOGIN=false

View File

@ -21,7 +21,6 @@ services:
VINYLDNS_BASE_VERSION: "${VINYLDNS_BASE_VERSION}"
environment:
RUN_SERVICES: "deps-only tail-logs"
LOCALSTACK_EXT_HOSTNAME: "${LOCALSTACK_EXT_HOSTNAME:-vinyldns-integration}"
env_file:
.env
ports:
@ -42,7 +41,7 @@ services:
volumes:
- ../build/docker/api/application.conf:/opt/vinyldns/conf/application.conf
env_file:
.env
- .env
ports:
- "9000:9000"
depends_on:

View File

@ -101,7 +101,6 @@ while [[ $# -gt 0 ]]; do
shift
;;
-d | --deps-only)
export LOCALSTACK_EXT_HOSTNAME="localhost"
SERVICE="integration ldap"
shift
;;