Skip to content

Commit 86ed889

Browse files
committed
agency hostname test commit
1 parent 7ca2e01 commit 86ed889

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
password: ${{ secrets.REGISTRY_PASSWORD }}
3030
- run: |
3131
cd $GITHUB_WORKSPACE
32-
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/aries-cloud-agency-image:latest --build-arg AGENCY_INBOUND_PORT=7000 --build-arg AGENCY_ADMIN_PORT=2000 --build-arg AGENCY_ENDPOINT=${{ secrets.AGENCY_ENDPOINT }} --build-arg AGENCY_ADMIN_API_KEY=${{ secrets.AGENCY_ADMIN_API_KEY }} --build-arg GENESIS_URL=${{ secrets.GENESIS_URL }}
32+
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/aries-cloud-agency-image:latest --build-arg AGENCY_INBOUND_PORT=7000 --build-arg AGENCY_ADMIN_PORT=2000 --build-arg AGENCY_ENDPOINT=${{ secrets.AGENCY_ENDPOINT }} --build-arg AGENCY_ADMIN_API_KEY=${{ secrets.AGENCY_ADMIN_API_KEY }} --build-arg GENESIS_URL=${{ secrets.GENESIS_URL }} --build-arg AGENCY_HOSTNAME=${{ secrets.AGENCY_HOSTNAME }}
3333
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/aries-cloud-agency-image:latest
3434
3535
- name: 'Deploy to Azure Agency Container Instance'

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ARG AGENCY_ADMIN_PORT
66
ARG AGENCY_ADMIN_API_KEY
77
ARG AGENCY_INBOUND_PORT
88
ARG AGENCY_ENDPOINT
9+
ARG AGENCY_HOSTNAME
910
ARG GENESIS_URL
1011

1112
RUN pip install aries-cloudagent
@@ -18,7 +19,8 @@ ENV admin_api_key=$AGENCY_ADMIN_API_KEY \
1819
admin_port=$AGENCY_ADMIN_PORT \
1920
agency_endpoint=$AGENCY_ENDPOINT \
2021
inbound_port=$AGENCY_INBOUND_PORT \
21-
genesis_url=$GENESIS_URL
22+
genesis_url=$GENESIS_URL \
23+
host_name=$AGENCY_HOSTNAME
2224

2325
EXPOSE 7000 2000
2426

aries_cloudagency/agency/server.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def str_to_bool(s):
2121
admin_port = os.getenv("admin_port", "2000")
2222
agency_endpoint = os.getenv("agency_endpoint", "http://0.0.0.0")
2323
inbound_port = os.getenv("inbound_port", "7000")
24+
agency_hostname = os.getenv("host_name", "0.0.0.0")
2425
genesis_url = os.getenv("genesis_url", "http://greenlight.bcovrin.vonx.io/genesis")
2526

2627

@@ -31,16 +32,16 @@ async def start():
3132
contextBuilder.settings.set_default("admin.admin_insecure_mode", admin_insecure_mode)
3233
else:
3334
contextBuilder.settings.set_default("admin.admin_api_key", admin_api_key)
34-
contextBuilder.settings.set_default("admin.host", "0.0.0.0")
35+
contextBuilder.settings.set_default("admin.host", agency_hostname)
3536
contextBuilder.settings.set_default("admin.port", admin_port)
3637
contextBuilder.settings.set_default("admin.webhook_urls", "")
37-
contextBuilder.settings.set_default("transport.inbound_configs", [["http", "0.0.0.0", inbound_port]])
38+
contextBuilder.settings.set_default("transport.inbound_configs", [["http", agency_hostname, inbound_port]])
3839
contextBuilder.settings.set_default("transport.outbound_configs", ["http"])
3940

4041
contextBuilder.settings.set_default("default_label", "Aries Cloud Agency")
4142
contextBuilder.settings.set_default("default_endpoint", agency_endpoint + ":" + inbound_port)
4243
contextBuilder.settings.set_default("ledger.genesis_transactions", False)
43-
contextBuilder.settings.set_default("ledger.genesis_url", "http://greenlight.bcovrin.vonx.io/genesis")
44+
contextBuilder.settings.set_default("ledger.genesis_url", genesis_url)
4445

4546
contextBuilder.settings.set_default("wallet.type", "Indy")
4647

0 commit comments

Comments
 (0)