• ShekharReddy joined the channel
      • brice joined the channel
      • cetchmoh joined the channel
      • cetchmoh
        hi there
      • amcm joined the channel
      • netcho joined the channel
      • gregf_ joined the channel
      • jasondotstar joined the channel
      • brice
        ... I wish docker would set an ENV variable with the randomly chosen ports. Ie. PORT_3160=32932
      • grisbyte joined the channel
      • brimstone has quit
      • SkinnyMelon joined the channel
      • ShekharReddy has quit
      • halt has quit
      • grisbyte has quit
      • boucher has quit
      • herrkin joined the channel
      • beautifulmind has quit
      • KekSi
        brice: why? 'docker port CONTAINER 3160' not good enough for you?
      • ldiamond has quit
      • brice
        would like my services to register themselves for outside interfaces to talk to
      • jalateras joined the channel
      • p1k_ is now known as p1k
      • KekSi
        register to what?
      • brice
        consul, etcd, etc.
      • KekSi
        well registrator can do that for you
      • BlackthornYugen
        I think if you link container a to container b it will have environment variables set
      • KekSi
        there's a reason its so massively popular
      • BlackthornYugen
        In container a
      • qba73 has quit
      • KekSi
        you shouldn't do container linking any more (does that actually still work in 1.12 btw?)
      • flowflow2 joined the channel
      • brice
        I'll check out registrator, thanks.
      • BlackthornYugen
        Oh, I'm pretty sure it does.
      • My stuff would break without it
      • qba73 joined the channel
      • KekSi
        BlackthornYugen: why no swarm/compose for this then? then you get autodiscovery with this and just call yourservicename:port
      • BlackthornYugen
        Linking also sets the other container in the hosts file,
      • I haven't tried compose yet... I've kept using dockerfiles.
      • ash_workz has quit
      • KekSi
        i'm using consul in a similar way: to give service discovery and loadbalancing (with dns) to non-dockerized things
      • BlackthornYugen
        Have a lot of stuff that works that way. I should probably look into it I guess.
      • absubram has quit
      • buck1 joined the channel
      • I do shoot myself in the foot when containers don't come back up in the right order after a failure, so it'd probably be worth the time to improve it.
      • KekSi
        "depends" makes sure they spawn in the correct order in compose
      • Akimbas has quit
      • does however not give you good timing so if your db takes a while until it takes connections but your app (started afterwards) starts up quickly
      • BlackthornYugen
        Thats useful... how hard is it to migrate legacy dockerfiles to compose?
      • KekSi
        you may still have problems there
      • those 2 don't have much to do with one another
      • BlackthornYugen
        Oh, I thought it replaced dockerfiles
      • qba73 has quit
      • KekSi
        you still build your images (or compose may build them for you, there's directives for that)
      • no, compose handles a full application with databases, apps, webservers, whatever have you
      • BlackthornYugen
        Going to a meetup on Thursday that is going to talk about Docker. Probably a good idea to do some homework first :)
      • KekSi
        look at some examples, it's actually very easy and gives you DNS within the network
      • BlackthornYugen
        I know the docs are there. I've just been really lazy >_>
      • Ok
      • KekSi
        there's a good example down there under 'Version 2'
      • that should give you some easy insight into it
      • buck1 has quit
      • cmheisel_ has quit
      • cmheise__ joined the channel
      • amerine joined the channel
      • you're just getting yaml formatted 'docker run' statements that are also started into a network together (and therefor can adress one another by their service name and on the internal port)
      • and you can scale them and things like that -- so its a very easy way to have your multi-container deploy in a neat and easily readable file
      • BlackthornYugen
        So I'd be moving logic from my bash scripts into yml compose files...
      • _ari_ joined the channel
      • Would definatly be more readable.
      • KekSi
      • BlackthornYugen
        Just need to take the time to actually do it.
      • zwarag joined the channel
      • Thanks :)
      • KekSi
        i went from ~15 bash scripts (500+ lines each) to a single 800 line yml file
      • and i absolutely don't want to go back :D
      • BlackthornYugen
      • Nice :D
      • csk_ joined the channel
      • KekSi
        i had bash scripts for pretty much all the configuration and services like (mongodb which could start a cluster with x509 certificate validation etc etc)
      • flowflow2 has quit
      • Yiota joined the channel
      • csk has quit
      • some of the code i made optional arguments in an entrypoint in my images
      • BlackthornYugen
        Going to be starting a new project soon. I'll see if I get any hate for breaking the pattern and doing it that way. :P
      • I think I can sell it.
      • KekSi
        but the current live deployment with 33 services is 880lines of yml (+ some more files because i used inheritance and pulled out shared configuration like logdriver specifics, dns specifics etc etc)
      • saved some lines there but probably added about the same amount but it's tidier now
      • tommmied joined the channel
      • it has everything though: databases, lots of apps, monitoring with prometheus & lots of exporters etc etc
      • boucher joined the channel