GithubHelp home page GithubHelp logo

erkules / docker-compose-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itinance/docker-compose-test

0.0 3.0 0.0 8 KB

test project learning docker compose

Shell 25.07% JavaScript 74.93%

docker-compose-test's Introduction

Introduction to docker-container-orchestration

https://blog.codeship.com/orchestrate-containers-for-development-with-docker-compose/

Installation

  1. launch EC2
  2. install docker

e.g. on Debian Jessie:

wget https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.9.1-0~jessie_amd64.deb
sudo apt-get update
dpkg -i docker-engine_1.9.1-0~jessie_amd64.deb

if you get errors, try:

apt-get -f install
dpkg -i docker-engine_1.9.1-0~jessie_amd64.deb
  1. install docker-compose following these instructions: https://docs.docker.com/compose/install/
  2. sudo mkdir /data
  3. sudo chown ubuntu /data
  4. clone the backend repository:
  5. run docker-compose and spawn all instances:
docker-compose up -d
docker run -d --name=nginx-proxy --restart=always -p 80:80 -p 443:443 -v /etc/nginx/vhost.d -v /usr/share/nginx/html -v /etc/nginx/ssl:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
sudo docker run -d -v /etc/nginx/ssl:/etc/nginx/certs:rw --volumes-from nginx-proxy -v /var/run/docker.sock:/var/run/docker.sock:ro jrcs/letsencrypt-nginx-proxy-companion
  1. verify running containers:
docker ps
  1. Find out IP-Address of rethink-container:
docker inspect $ContainerID|grep IPA
  1. Pass this IP-Address into ./server/datasources.json

Trouble-Shooting/Uninstallation

  1. remove all containers:
docker rm -f  $(docker ps -a -q)
  1. remove all images:
docker rmi $(docker images -q)
  1. consider also rebuilding:
docker-compose up --build

Database

Create backups of database as follows:

  1. SSH into docker container
dookie pull --db company --file my-backup.json

Import backupfile

dookie push --db company-restored --file my-backup.json

TODO:

  • make Step 9 and 10 obsolete by working with a localhost an exposed ports
  • find out how to backup from host instead of local container
  • implement backup szenario

docker-compose-test's People

Contributors

erkules avatar itinance avatar

Watchers

 avatar  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.