From cde6781d4a46f843f2d83fe13b28ff0ec7e52748 Mon Sep 17 00:00:00 2001 From: MalinAhlberg Date: Fri, 25 Oct 2024 13:14:57 +0200 Subject: [PATCH] connect auth to db --- docker-compose.yml | 6 ++++++ scripts/make_credentials.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5bd6e57..723dd86 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,9 +26,13 @@ services: container_name: auth command: sda-auth image: ghcr.io/neicnordic/sensitive-data-archive:v0.3.25 + networks: + - secure depends_on: credentials: condition: service_completed_successfully + postgres: + condition: service_healthy environment: - OIDC_ID=${auth_ELIXIR_ID} - OIDC_PROVIDER=http://${DOCKERHOST:-localhost}:8080/oidc/ @@ -37,6 +41,8 @@ services: - OIDC_REDIRECTURL=http://localhost:8085/oidc/login - LOG_LEVEL=debug - RESIGNJWT=false + - DB_PASSWORD=${auth_DB_PASSWORD} + - DB_USER=${auth_DB_USER} extra_hosts: - ${DOCKERHOST:-localhost}:host-gateway volumes: diff --git a/scripts/make_credentials.sh b/scripts/make_credentials.sh index 455cdf0..9a6983f 100644 --- a/scripts/make_credentials.sh +++ b/scripts/make_credentials.sh @@ -10,7 +10,7 @@ apt-get -o DPkg::Lock::Timeout=60 install -y curl jq postgresql-client openssl > pip install --upgrade pip > /dev/null pip install aiohttp Authlib joserfc requests > /dev/null -for n in download finalize inbox ingest mapper sync verify; do +for n in api auth download finalize inbox ingest mapper sync verify; do echo "creating credentials for: $n" ## password and permissions for MQ body_data=$(jq -n -c --arg password "$n" --arg tags none '$ARGS.named')