From 71cf8239c3d93fe37d69f89f2c2597c4bd681b71 Mon Sep 17 00:00:00 2001 From: Mike Hukiewitz <70762838+MHHukiewitz@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:26:06 +0200 Subject: [PATCH] Fix: do not use localhost (#468) --- alembic.ini | 2 +- deployment/docker-build/config.yml | 4 ++-- docs/guides/install.rst | 4 ++-- src/aleph/api_entrypoint.py | 2 +- src/aleph/config.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/alembic.ini b/alembic.ini index 206038499..afc46f28b 100644 --- a/alembic.ini +++ b/alembic.ini @@ -55,7 +55,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne # are written from script.py.mako # output_encoding = utf-8 -sqlalchemy.url = driver://user:pass@localhost/dbname +sqlalchemy.url = driver://user:pass@127.0.0.1/dbname [post_write_hooks] diff --git a/deployment/docker-build/config.yml b/deployment/docker-build/config.yml index 3d4d26e52..8cc811ca5 100644 --- a/deployment/docker-build/config.yml +++ b/deployment/docker-build/config.yml @@ -22,7 +22,7 @@ binancechain: packing_node: False mongodb: - uri: "mongodb://localhost:27017" + uri: "mongodb://127.0.0.1:27017" database: aleph storage: @@ -31,7 +31,7 @@ storage: ipfs: enabled: True - host: localhost + host: 127.0.0.1 port: 5001 gateway_port: 8080 diff --git a/docs/guides/install.rst b/docs/guides/install.rst index 404194e9b..f0c7c2054 100644 --- a/docs/guides/install.rst +++ b/docs/guides/install.rst @@ -186,7 +186,7 @@ You should see the following three containers with a State of "Up": Check the metrics ------------------ -Check that messages are being processed by the node by looking on the metric endpoint, by default http://localhost:4024/metrics . +Check that messages are being processed by the node by looking on the metric endpoint, by default http://127.0.0.1:4024/metrics . The number of messages should change when you refresh the page, starting with the variable pyaleph_status_sync_pending_messages_total @@ -202,7 +202,7 @@ You can use `docker-compose logs` and `docker logs` for this purpose. Check IPFS ---------- -IPFS Web UI: http://localhost:5001/webui +IPFS Web UI: http://127.0.0.1:5001/webui .. warning:: This web interface is only accessible on localhost in the default Docker Compose configuration. diff --git a/src/aleph/api_entrypoint.py b/src/aleph/api_entrypoint.py index b5031f8de..1f5d8b506 100644 --- a/src/aleph/api_entrypoint.py +++ b/src/aleph/api_entrypoint.py @@ -88,4 +88,4 @@ async def create_app() -> web.Application: if __name__ == "__main__": import asyncio - web.run_app(create_app(), host="localhost", port=8000) + web.run_app(create_app(), host="127.0.0.1", port=8000) diff --git a/src/aleph/config.py b/src/aleph/config.py index d5ecfab1c..34df86ecf 100644 --- a/src/aleph/config.py +++ b/src/aleph/config.py @@ -100,8 +100,8 @@ def get_defaults(): "pool_size": 50, }, "mail": { - "email_sender": "aleph@localhost.localdomain", - "smtp_url": "smtp://localhost", + "email_sender": "aleph@127.0.0.1.localdomain", + "smtp_url": "smtp://127.0.0.1", }, "ipfs": { "enabled": True,