Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Problems with .env variables referencing other .env variables #61

Closed
matgnt opened this issue Sep 10, 2020 · 1 comment
Closed

Problems with .env variables referencing other .env variables #61

matgnt opened this issue Sep 10, 2020 · 1 comment

Comments

@matgnt
Copy link

matgnt commented Sep 10, 2020

It turned out, docker-compose 1.25.0 and other older versions don't support this.

We should either (somehow) check and stop the starting process, or don't use them and instead fully write down the variable content, e.g.
.env-example:

BPA_PROFILE_ENDPOINT=https://${BPA_HOST}/profile.jsonld

vs.

BPA_PROFILE_ENDPOINT=https://localhost/profile.jsonld
@domwoe
Copy link

domwoe commented Sep 10, 2020

If look through .env-example I see the following cases:

BPA_PROFILE_ENDPOINT=https://${BPA_HOST}/profile.jsonld
LEDGER_URL=https://indy-test.bosch-digital.de
BPA_LEDGER_BROWSER=${LEDGER_URL}
AGENT_HTTP_PORT=8030
AGENT_ADMIN_PORT=8031
AGENT_ENDPOINT=http://${BPA_HOST}:${AGENT_HTTP_PORT}
ACAPY_ADMIN_URL=http://aca-py:${AGENT_ADMIN_PORT}
ACAPY_AGENT_URL=http://aca-py:${AGENT_HTTP_PORT}

Except the middle case (LEDGER_URL and BPA_LEDGER_BROWSER) which might make sense to configure them independently, I'd say the other ones are directly dependent. Couldn't we just move

BPA_PROFILE_ENDPOINT=https://${BPA_HOST}/profile.jsonld
AGENT_ENDPOINT=http://${BPA_HOST}:${AGENT_HTTP_PORT}
ACAPY_ADMIN_URL=http://aca-py:${AGENT_ADMIN_PORT}
ACAPY_AGENT_URL=http://aca-py:${AGENT_HTTP_PORT}

inside the docker-compose.yml and change the .env to the following?

LEDGER_URL=https://indy-test.bosch-digital.de
BPA_LEDGER_BROWSER=https://indy-test.bosch-digital.de

domwoe pushed a commit to boschresearch/business-partner-agent that referenced this issue Sep 14, 2020
Signed-off-by: Woerner Dominic (RBCH/PJ-IOT) <dominic.woerner2@ch.bosch.com>
domwoe pushed a commit to boschresearch/business-partner-agent that referenced this issue Sep 30, 2020
Signed-off-by: Woerner Dominic (RBCH/PJ-IOT) <dominic.woerner2@ch.bosch.com>
@domwoe domwoe closed this as completed in 4535b04 Sep 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants