Subdomains on a coreOS system Subdomains on a coreOS system nginx nginx

Subdomains on a coreOS system


Yes, this is absolutely possible. It involves two steps:

  1. Service discovery for the docker containers that make up your development environments. This means writing their IP:port combo into etcd when the containers are started.This blog post goes into detail on the service registration part of it: http://coreos.com/blog/zero-downtime-frontend-deploys-vulcand/

  2. Using confd to dynamically write out your nginx config. Confd will read from etcd and use a loop to set up your server blocks. Nginx will then be reloaded to apply the new settings.You can see this all put together in this blog post: http://marceldegraaf.net/2014/04/24/experimenting-with-coreos-confd-etcd-fleet-and-cloudformation.html

Confd Github:https://github.com/kelseyhightower/confd