dev/docker-compose.yml
author ymh <ymh.work@gmail.com>
Fri, 16 Mar 2018 12:29:12 +0100
changeset 687 53fee689f666
parent 686 385e3a12ee27
permissions -rw-r--r--
Dockerfile correction and add a way to save/load the docker images.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
686
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
version: '3'
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
services:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
  # postgres
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  pg:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
    image: postgres:alpine
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
    environment:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
      POSTGRES_USER: iri
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
      POSTGRES_PASSWORD: iri
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
      POSTGRES_DB: hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    ports:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
      - '5432:5432'
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
    volumes:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
      - pg-data:/var/lib/postgresql/data
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
  # nginx (webserver)
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
  front:
687
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    17
    image: hdalab_front:latest
686
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    build:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
      context: ./front
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    ports:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
      - '8080:80'
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
    depends_on:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
      - "hdalab"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    volumes:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
      - static-content:/var/lib/hdalab/static
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
      - front-data:/usr/share/nginx/html
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
      - front-logs:/var/log/nginx
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
  # Elasticsearch
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
  es:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    image: docker.elastic.co/elasticsearch/elasticsearch:5.6.8
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    environment:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
      - "discovery.type=single-node"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
      - "cluster.name=docker-cluster"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
      - "xpack.security.enabled=false"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
      - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
    volumes:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
      - es-data:/usr/share/elasticsearch/data
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
  # mailhog
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
  mail:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    image: mailhog/mailhog
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    ports:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
      - "8025:8025"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
  # rabbitmq
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
  rabbitmq:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
    hostname: hdalab-rabbitmq
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
    image: rabbitmq:alpine
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
    environment:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
      RABBITMQ_DEFAULT_VHOST: hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
  # hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
  hdalab:
687
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    52
    image: hdalab_hdalab:latest
686
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
    build: ./hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
    volumes:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
      - static-content:/var/lib/hdalab/static
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
      - hdalab-logs:/var/log/hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
    depends_on:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
      - "pg"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
      - "es"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
      - "mail"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
      - "rabbitmq"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
volumes:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
  static-content:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
  hdalab-logs:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
  pg-data:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
  front-data:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
  front-logs:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
  es-data:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70