Recommended way to run a Docker Compose stack in production? -


i have couple of compose files (docker-compose.yml) describing simple django application (five containers, 3 images).

i want run stack in production - have whole stack begin on boot, , containers restart or recreated if crash. there aren't volumes care , containers won't hold important state , can recycled @ will.

i haven't found information on using docker-compose in production in such way. the documentation helpful doesn't mention starting on boot, , using amazon linux don't (currently) have access docker machine. i'm used using supervisord babysit processes , ensure start on boot up, don't think way docker containers, end being supervised docker daemon?

as simple start thinking put restart: always on services , make init script docker-compose -d on boot. there recommended way manage docker-compose stack in production in robust way?

edit: i'm looking 'simple' way run equivalent of docker-compose up container stack in robust way. know upfront containers declared in stack can reside on same machine; in case don't have need orchestrate containers same stack across multiple instances, helpful know well.

compose client tool, when run docker-compose -d container options sent engine , stored. if specify restart always (or preferably unless-stopped to give more flexibility) don't need run docker-compose up every time host boots.

when host starts, provided have configured docker daemon start on boot, docker start containers flagged restarted. need run docker-compose -d once , docker takes care of rest.

as orchestrating containers across multiple nodes in swarm - preferred approach use distributed application bundles, that's (as of docker 1.12) experimental. you'll create bundle local compose file represents distributed system, , deploy remotely swarm. docker moves fast, expect functionality available soon.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -