Git Product home page Git Product logo

openmrs-contrib-ansible-docker-compose's Introduction

ansible-docker-compose

This in an OpenMRS ansible role responsible for deploying all the docker-compose files required by OpenMRS infrastructure.

This is a custom role.

Running a docker-compose application locally

  • Install docker 1.12+ and docker-compose 1.10+
  • Move to the correct application subfolder (e.g. files/demo)
  • docker-compose up to start it, and docker-compose down to power it off. Follow more details on the README file.

Deploying a new docker-compose application to our infrastructure

Process

  • Create a branch/fork of this repository.
  • Create a subfolder in https://github.com/openmrs/openmrs-contrib-ansible-docker-compose/tree/master/files for your application. All files required by your application, including docker-compose.yaml file will live there.
  • Create a pull request and notify the infrastructure team (telegram or talk). Let us know which DNS name you'd like to use. Let us know if you prefer to have newer images deployed automatically from a Bamboo build or when pushed to dockerhub.
  • Infrastructure team will merge the pull request, add passwords and secrets, configure deployment of newer versions of the image, and deploy this docker-compose app to a server.

Note: while you are can deploy new versions of the application without infrastructure team involvement, changes to docker-compose files will need to be deployed by us.

Guidelines

Your docker-compose file needs to follow the following rules:

  • All the docker images should come from dockerhub (Use https://hub.docker.com/u/openmrs/ for our own images). You cannot build an image from this repository.
  • Docker images should have CI or an automated build to deploy to dockerhub.
  • Pay a lot of attention your image tags. As soon as an image is pushed to dockerhub, deployment will be automatically started. So it's recommended to have an image tag per server deployed (e.g. 'stg' and 'prd', instead of using 'latest').
  • Docker images should never contain passwords and secrets hardcoded. Always allow secrets to be overridden by environment variables.
  • Add a README file.
  • Add healthchecks to all docker containers. (use docker 1.12+ and docker-compose 1.10+ to have this feature).
  • Add a 'restart: always' to your docker containers, otherwise they won't be started when the host is restarted.
  • Expose the port which should be called from the web interface.
  • If you want to persist docker volumes between deployments, make sure to create a deploy.env file with the following content:

DESTROY_VOLUMES=false

By default, volumes are destroyed on every deployment.

openmrs-contrib-ansible-docker-compose's People

Contributors

bmamlin avatar cintiadr avatar djazayeri avatar rkorytkowski avatar robbyoconnor avatar sparshadotel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.