diff --git a/src/aleph/config.py b/src/aleph/config.py index e656f0f83..d5ecfab1c 100644 --- a/src/aleph/config.py +++ b/src/aleph/config.py @@ -92,7 +92,7 @@ def get_defaults(): "sync_contract": "KT1FfEoaNvooDfYrP61Ykct6L8z7w7e2pgnT", }, "postgres": { - "host": "127.0.0.1", + "host": "postgres", "port": 5432, "database": "aleph", "user": "aleph", @@ -105,7 +105,7 @@ def get_defaults(): }, "ipfs": { "enabled": True, - "host": "127.0.0.1", + "host": "ipfs", "port": 5001, "gateway_port": 8080, "id": None, @@ -118,7 +118,7 @@ def get_defaults(): ], }, "rabbitmq": { - "host": "127.0.0.1", + "host": "rabbitmq", "port": 5672, "username": "aleph-p2p", "password": "change-me!", @@ -127,7 +127,7 @@ def get_defaults(): "message_exchange": "aleph-messages", }, "redis": { - "host": "127.0.0.1", + "host": "redis", "port": 6379, }, "sentry": { diff --git a/tests/conftest.py b/tests/conftest.py index d3594cd37..3d837f52f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -67,6 +67,12 @@ def session_factory(mock_config): @pytest.fixture def mock_config(mocker): config = Config(aleph.config.get_defaults()) + + # The postgres/redis hosts use Docker network names in the default config. + # We always use localhost for tests. + config.postgres.host.value = "127.0.0.1" + config.redis.host.value = "127.0.0.1" + # To test handle_new_storage config.storage.store_files.value = True