Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using Hostname in PeerAddress #69

Closed
pydio-bot opened this issue Feb 15, 2019 · 0 comments
Closed

Allow using Hostname in PeerAddress #69

pydio-bot opened this issue Feb 15, 2019 · 0 comments

Comments

@pydio-bot
Copy link
Member

There are several cases where Docker doesn't allow a static IP; for example when running swarm mode, or when using Kubernetes.

Each container instance that is started gets a dynamic IP, and this conflicts with the need to specify a PeerAddress IP in /root/.config/pydio/cells/pydio.json, for example:

"pydio.grpc.data.index.cellsdata": {
  "PeerAddress": "10.0.1.229",

Docker does a great job of resolving the container's hostname, so this would work nicely if we could instead specify the hostname:

"pydio.grpc.data.index.cellsdata": {
  "PeerAddress": "cells",

Note that I'm currently using a workaround of overriding the start command in the docker compose file, but this feels very ugly, and a bit fragile:

  cells:
    image: pydio/cells:latest
    command: [ '/bin/sh', '-c', 'echo `tail -1 /etc/hosts | cut -f 1` > /home/ip.txt; sed -i "/PeerAddress/ s/: .*/: \"`cat /home/ip.txt`\",/g" /root/.config/pydio/cells/pydio.json; exec /bin/docker-entrypoint.sh cells start' ]

--
[Do not edit below]
#57
{gid:cells:406106025}

[Do not edit below]
#67
{gid:cells:410854373}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant