Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Autodiscovery for Docker Containers #23

Open
blacklabelops opened this issue May 2, 2017 · 2 comments
Open

Autodiscovery for Docker Containers #23

blacklabelops opened this issue May 2, 2017 · 2 comments

Comments

@blacklabelops
Copy link
Collaborator

blacklabelops commented May 2, 2017

Question: Would autodiscovery in this image greatly improve your work? Please give feedback!

Scenario:

  1. Rather than enumerate env variables on the nginx container attach those environment variables on an arbitrary amount of containers.
  2. Attach the docker socket to the nginx container
  3. Entrypoint will read a list of containers and look for those environment variables.
  4. All containers with those environment variables will be included in the configuration.

Enhancement:

  • Periodical auto-re-discover.

Example:

Starting application Jira:

docker run -d --name jira \
    --network jiranet \
      -e "JIRA_DATABASE_URL=postgresql://jira@postgres/jiradb" \
      -e "JIRA_DB_PASSWORD=jellyfish"  \
      -e "NGINX_REVERSE_PROXY_LOCATION1=/" \
      -e "NGINX_REVERSE_PROXY_PASS1=http://jira:8080" \
      blacklabelops/jira

Starting nginx:

docker run -d \
    -p 80:80 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    --name nginx \
    --network jiranet \
    blacklabelops/nginx
@eOperationsPN
Copy link

Yes, absolutely! As jwilders nginx reverse proxy! Would love to see this feature

@MrHash
Copy link
Contributor

MrHash commented Jun 3, 2017

I think it could be useful although I would suggest a 3.x branch as I imagine there to be a fair amount of complexity, such as handling multiple server definitions from a container, push/pull reload strategies, configuration validation, load balancing support etc. while also maintaining BC.

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

No branches or pull requests

3 participants