I tried to move away from static IPs using container.lxd domains. But it seems that container.lxd domains are not available during server boot. Later I have no problem using it.
Two containers: https and tdb. First is nginx webserver, second is CMS. Nginx is reverse proxy:
proxy_pass http://tdb.lxd/;
proxy_redirect http://tdb.lxd https://www.domain.com;
This setup works ok if I start https container by hand. But if I reboot the server and log into https then I find nginx not started:
host not found in upstream "tdb.lxd" in /etc/nginx/conf.d/tdb.conf:15
But if run /etc/init.d/nginx start then nginx starts just fine. And ping tdb.lxd works too. And lxc restart https works too.
Any ideas how to deal with it?