Skip to content

Commit

Permalink
Access aai-mock through dockerhost
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Feb 16, 2024
1 parent 2147d7c commit 6673638
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ credentials_PGPASSWORD=rootpass

# auth
auth_ELIXIR_ID=XC56EL11xx
auth_ELIXIR_PROVIDER=http://aai-mock:8080/oidc/
auth_ELIXIR_PROVIDER=http://dockerhost:8080/oidc/
auth_ELIXIR_SECRET=wHPVQaYXmdDHg
auth_ELIXIR_JWKPATH=jwk
auth_ELIXIR_REDIRECTURL=http://localhost:8085/elixir/login
auth_LOG_LEVEL=info
auth_S3INBOX=localhost:8000
auth_RESIGNJWT=false
auth_S3INBOX=httpp://dockerhost:8000

# rabbitmq
rabbitmq_MQ_PASSWORD=test
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ no further editing to the above files is required for running the stack locally.
To bootstrap the *full stack* of `storage-and-interfaces` services use
the file `docker-compose.yml`. Note that this requires a running [`LS-AAI-mock`](https://github.com/GenomicDataInfrastructure/starter-kit-lsaai-mock) service. To configure the LS-AAI-mock service follow the instructions below.

Run the following command to add the `aai-mock` to the `/etc/hosts` file:
Run the following command to add the `dockerhost` to the `/etc/hosts` file:

```shell
sudo sh -c "echo '127.0.0.1 aai-mock' >>/etc/hosts"
sudo sh -c "echo '127.0.0.1 dockerhost' >>/etc/hosts"
```

First clone the [startet-kit-lsaai-mock](https://github.com/GenomicDataInfrastructure/starter-kit-lsaai-mock) repo.

Under its root folder, change the first two lines of the file `configuration/aai-mock/application.properties` to:

```conf
main.oidc.issuer.url=http://aai-mock:8080/oidc/
web.baseURL=https://aai-mock:8080/oidc
main.oidc.issuer.url=http://dockerhost:8080/oidc/
web.baseURL=https://dockerhost:8080/oidc
```

and then add the `sda-auth` client by creating a file `configuration/aai-mock/clients/client1.yaml` with the following contents:
Expand Down
14 changes: 6 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ services:
- PUBLICFILE=/shared/c4gh.pub.pem
- RESIGNJWT=false
- S3INBOX=${auth_S3INBOX}
extra_hosts:
- "dockerhost:host-gateway"
volumes:
- shared:/shared
ports:
- 8085:8080
networks:
- public
- my-app-network
restart: always

rabbitmq:
Expand Down Expand Up @@ -136,11 +135,12 @@ services:
environment:
- DB_PASSWORD=${download_DB_PASSWORD}
- DB_USER=${download_DB_USER}
extra_hosts:
- "dockerhost:host-gateway"
image: ghcr.io/neicnordic/sensitive-data-archive:v0.2.88-download
networks:
- public
- secure
- my-app-network
ports:
- 8443:8443
restart: always
Expand Down Expand Up @@ -273,11 +273,12 @@ services:
- BROKER_USER=${s3inbox_BROKER_USER}
- DB_PASSWORD=${s3inbox_DB_PASSWORD}
- DB_USER=${s3inbox_DB_USER}
extra_hosts:
- "dockerhost:host-gateway"
image: ghcr.io/neicnordic/sensitive-data-archive:v0.2.88
networks:
- public
- secure
- my-app-network
ports:
- "8000:8000"
restart: always
Expand All @@ -294,6 +295,3 @@ volumes:
networks:
public:
secure:
# required for allowing auth to connect to ls-aai-mock
my-app-network:
name: my-app-network

0 comments on commit 6673638

Please sign in to comment.