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

Support multiple service names and ports #3

Open
robertgartman opened this issue Jul 22, 2017 · 1 comment
Open

Support multiple service names and ports #3

robertgartman opened this issue Jul 22, 2017 · 1 comment

Comments

@robertgartman
Copy link

Great work! The cluster setup deserves a bunch of stars on its own.

We have the need of running multiple environments (e.g. dev, int, prod etc.). There are places in the code where service name and port are hardcoded. It would be just sweet if those could be parameterised as well. Example:

    curl -X PUT http://$COUCHDB_USER:$COUCHDB_PASSWORD@couchdb1:5984/_users
    curl -X PUT http://$COUCHDB_USER:$COUCHDB_PASSWORD@couchdb1:5984/_replicator
    curl -X PUT http://$COUCHDB_USER:$COUCHDB_PASSWORD@couchdb1:5984/_global_changes

Given the Swarm setup, each service need their own port. Forking is of course an alternative but better yet would be if this service definition becomes the de facto standard for couchdb and swarm.

The use case I think of is to launch multiple services in the same Swarm by altering the service name and port.

docker service create --replicas 2 --name dev_couchdb --network couchdb-network \
   < cut >
  -p 5983:5984 \
  redgeoff/couchdb-service

docker service create --replicas 2 --name int_couchdb --network couchdb-network \
   < cut >
  -p 5984:5984 \
  redgeoff/couchdb-service
@redgeoff
Copy link
Owner

Thanks, @robertgartman! Yeah, I completely agree that those areas should be made configurable. Any chance you want to submit a PR and I'll code review it?

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

2 participants