calling the redis server `redis` makes ocis try to access redis on `127.0.0.1`
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 103
Description
## Describe the bug
It is not possible to have a redis server being accessible on the domain name `redis`
## Steps to reproduce
1. use this docker-compose file
```
---
version: "3.7"
services:
ocis:
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
networks:
ocis-net:
ports:
- "9200:9200"
entrypoint:
- /bin/sh
command: [ "-c", "ocis init || true; ocis server" ]
environment:
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}"
OCIS_INSECURE: true
PROXY_HTTP_ADDR: 0.0.0.0:9200
PROXY_TLS: false
OCIS_CACHE_STORE: "redis"
OCIS_CACHE_STORE_NODES: "redis:6379"
restart: always
depends_on:
- redis
redis:
image: redis:6.2-alpine
restart: always
command: redis-server --save 20 1 --loglevel debug
networks:
ocis-net:
volumes:
- cache:/data
networks:
ocis-net:
volumes:
cache:
driver: local
```
2. try to start ocis
## Expected behavior
ocis works and used redis as cache
## Actual behavior
ocis keeps on crashing with
`ocis_1 | {"level":"error","service":"storage-system","pkg":"rgrpc","traceid":"00000000000000000000000000000000","error":"dial tcp 127.0.0.1:6379: connect: connection refused","status":{"code":15,"message":"error creating space","trace":"00000000000000000000000000000000"},"request":{"opaque":{"map":{"spaceid":{"decoder":"plain","value":"anNvbmNzMy1wdWJsaWMtc2hhcmUtbWFuYWdlci1tZXRhZGF0YQ=="}}},"owner":{"id":{"idp":"internal","opaque_id":"e6e28a54-fa03-43d2-b691-fba2e7879322"}},"type":"metadata","name":"Metadata"},"time":"2023-06-30T11:48:25.095833656Z","line":"github.com/cs3org/reva/v2@v2.14.0/internal/grpc/services/storageprovider/storageprovider.go:509","message":"failed to create storage space"}`
## Workaround
call the `redis` service anything else, e.g. `cache`
Contributor guide
Assessment
This issue has not been assessed yet.