From 27693ca9babbae09e6b015dfd0f0cd8c9b3fc116 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 3 Oct 2020 09:45:56 -0500 Subject: [PATCH] =?UTF-8?q?refactor(directory):=20=E2=99=BB=20extract=20di?= =?UTF-8?q?rectory-api.env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 +-- directory-api.env | 2 ++ docker-compose.dcproj | 1 + docker-compose.directory.migrations.tests.yml | 4 ++-- docker-compose.yml | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 directory-api.env diff --git a/.env b/.env index 222c88705..588cbc58e 100644 --- a/.env +++ b/.env @@ -5,9 +5,8 @@ ARCHIVAL_APPLICATION_INSIGHTS_SERVER_TELEMETRY_CHANNEL_STORAGE_PATH=application- ARCHIVAL_GIT_REPOSITORY_PATH=archives DIRECTORY_HOST=directory-api -DIRECTORY_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY= DIRECTORY_APPLICATION_INSIGHTS_SERVER_TELEMETRY_CHANNEL_STORAGE_PATH=application-insights -DIRECTORY_CONNECTION_STRING=Server=directory-db;Database=filterlists;User Id=filterlists;Password=filterlists; + DIRECTORY_DB_USER=filterlists DIRECTORY_DB_PASSWORD=filterlists DIRECTORY_DB_DATABASE=filterlists \ No newline at end of file diff --git a/directory-api.env b/directory-api.env new file mode 100644 index 000000000..73079eec0 --- /dev/null +++ b/directory-api.env @@ -0,0 +1,2 @@ +ApplicationInsights__InstrumentationKey= +ConnectionStrings__DirectoryConnection=Server=directory-db;Database=filterlists;User Id=filterlists;Password=filterlists; \ No newline at end of file diff --git a/docker-compose.dcproj b/docker-compose.dcproj index 16e5a4109..764f04d9f 100644 --- a/docker-compose.dcproj +++ b/docker-compose.dcproj @@ -10,6 +10,7 @@ + diff --git a/docker-compose.directory.migrations.tests.yml b/docker-compose.directory.migrations.tests.yml index 55ab50bf2..6c596f547 100644 --- a/docker-compose.directory.migrations.tests.yml +++ b/docker-compose.directory.migrations.tests.yml @@ -12,8 +12,8 @@ services: - directory-migrations-tests-results:/FilterLists.Directory.Infrastructure.Migrations.Tests/TestResults depends_on: - directory-db - environment: - ConnectionStrings__DirectoryConnection: ${DIRECTORY_CONNECTION_STRING} + env_file: + - directory-api.env directory-db: image: postgres:alpine diff --git a/docker-compose.yml b/docker-compose.yml index b9b4f49b3..05b76dfa7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,10 +59,10 @@ services: - directory-db volumes: - directory-application-insights:/app/${DIRECTORY_APPLICATION_INSIGHTS_SERVER_TELEMETRY_CHANNEL_STORAGE_PATH} + env_file: + - directory-api.env environment: ApplicationInsights__ServerTelemetryChannelStoragePath: ${DIRECTORY_APPLICATION_INSIGHTS_SERVER_TELEMETRY_CHANNEL_STORAGE_PATH} - ApplicationInsights__InstrumentationKey: ${DIRECTORY_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY} - ConnectionStrings__DirectoryConnection: ${DIRECTORY_CONNECTION_STRING} directory-db: image: postgres:alpine