From 50e27a38a05d712c5306d05cb090a8983d1718cf Mon Sep 17 00:00:00 2001 From: Matt Siwiec Date: Tue, 11 Jul 2023 17:14:32 -0600 Subject: [PATCH] fix devcontainer nats (#194) Signed-off-by: Matt Siwiec --- .devcontainer/.env | 6 +----- .devcontainer/devcontainer.json | 3 +-- .devcontainer/scripts/nats_account.sh | 13 ------------- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100755 .devcontainer/scripts/nats_account.sh diff --git a/.devcontainer/.env b/.devcontainer/.env index e53a3c732..674dde553 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -6,11 +6,7 @@ COCKROACH_URL="postgresql://root@crdb:26257/load_balancer_api_dev?sslmode=disabl # loadbalancerapi config ATLAS_DB_URI="postgresql://root@crdb:26257/atlas_migrations?sslmode=disable" LOADBALANCERAPI_CRDB_URI="postgresql://root@crdb:26257/load_balancer_api_dev?sslmode=disable" -LOADBALANCERAPI_NATS_CREDS_FILE=".devcontainer/nsc/nkeys/creds/LOCAL/LBAAS/USER.creds" -LOADBALANCERAPI_NATS_URL="nats://nats:4222" - -NATS_URL="nats://nats:4222" -NATS_CREDS="/tmp/user.creds" +LOADBALANCERAPI_EVENTS_PUBLISHER_NATS_CREDSFILE="/workspaces/load-balancer-api/.devcontainer/nsc/nkeys/creds/LOCAL/LBAAS/USER.creds" NKEYS_PATH="/workspaces/load-balancer-api/.devcontainer/nsc/nkeys" NSC_HOME="/workspaces/load-balancer-api/.devcontainer/nsc/nats" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ab59f2bc4..ce9880e4d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -29,6 +29,5 @@ }, "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {} - }, - "postStartCommand": "/workspaces/${localWorkspaceFolderBasename}/.devcontainer/scripts/nats_account.sh" + } } diff --git a/.devcontainer/scripts/nats_account.sh b/.devcontainer/scripts/nats_account.sh deleted file mode 100755 index 171d1a846..000000000 --- a/.devcontainer/scripts/nats_account.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -DIR="$( dirname -- "${BASH_SOURCE[0]}"; )"; -echo "DIR IS $DIR" -DEVCONTAINER_DIR="$DIR/.." - -sudo chown -Rh $USER:$USER $DEVCONTAINER_DIR/nsc - -echo "Dumping NATS user creds file" -nsc --data-dir=$DEVCONTAINER_DIR/nsc/nats/nsc/stores generate creds -a LBAAS -n USER > /tmp/user.creds - -echo "Dumping NATS sys creds file" -nsc --data-dir=$DEVCONTAINER_DIR/nsc/nats/nsc/stores generate creds -a SYS -n sys > /tmp/sys.creds