Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 2.16 KB

README.md

File metadata and controls

58 lines (47 loc) · 2.16 KB

Deployment of dlang-tour

The preferred way to deploy the dlang-tour on a production server is to use the Travis CI built docker image. To simplify container deployment it's recommended to use docker-compose.

Deployment with Docker Compose

The docker-compose.yml file contained in this folder contains everything to orchestrate the dlang-tour on a server that meets the requirements below. The Docker compose file also configures watchtower that checks periodically for updates on the latest tag of the Docker image and restarts the dlang-tour container when a newer version is available.

Requirements

  • Linux with kernel >= 3.10.
  • Docker installed on host system: >= 1.8.3
  • Docker compose:

CentOS

  • To allow the dlang-tour container to start other containers on CentOS, the following SELinux module needs be installed beforehand: https://github.com/dpw/selinux-dockersock
  • Make sure the docker daemon uses overlaystorage driver as the default devicemapper driver fills your drive after some time.
    • Change OPTIONS in /etc/sysconfig/docker: OPTIONS='--selinux-enabled=false -s overlay'
    • Run systemctl daemon-reload
    • Run systemctl restart docker
  • Make sure that docker-selinux is installed in an up-to-date version.

Installation of dlang-tour

  • Checkout the repository featuring the latest docker-compose.yml:
git clone https://github.com/dlang-tour/core.git
cd core/deploy
  • Adapt the environment variable GOOGLE_ANALYTICS_ID if needed in docker-compose.yml.
  • Run docker-compose up -d.
  • Running docker-compose logs tour will show logfiles of the currently running dlang-tour container.

Daily cron jobs

Copy docker_update.sh to /etc/cron.daily/docker_update.sh This is necessary to

  • remove old, unused images
  • remove left-overs containers (Docker --rm isn't perfect)
  • update the execution images (the watchtower only updates the base docker container)