version: '2'

services:

  website:
    build:
      context: .
      dockerfile: Website-Dockerfile
    expose:
      - "80"
      - "443"
    ports:
      - "1883:1883"
    volumes:
      - /etc/letsencrypt/live/www.lambdaspace.gr:/etc/letsencrypt/live/www.lambdaspace.gr:ro
      - /etc/letsencrypt/archive/www.lambdaspace.gr:/etc/letsencrypt/archive/www.lambdaspace.gr:ro

  redirector:
    image: nginx:stable-alpine
    volumes:
      - ./redirector-nginx.conf:/etc/nginx/nginx.conf:ro
      - /etc/letsencrypt/live/techministry.rocks:/etc/letsencrypt/live/techministry.rocks:ro
      - /etc/letsencrypt/archive/techministry.rocks:/etc/letsencrypt/archive/techministry.rocks:ro
    expose:
      - "80"
      - "443"

  proxy:
    build:
      context: .
      dockerfile: HAProxy-Dockerfile
    links:
      - website
      - redirector
    external_links:
      - app:discourse
    ports:
      - "80:80"
      - "443:443"

  ministerin:
    build:
      context: .
      dockerfile: MinisterIN-Dockerfile
    ports:
      - "7777:7777"

version: '2'

services:

  website:
    build:
      context: .
      dockerfile: Website-Dockerfile
    expose:
      - "80"
      - "443"
    volumes:
      - /etc/letsencrypt/live/www.lambdaspace.gr:/etc/letsencrypt/live/www.lambdaspace.gr:ro
      - /etc/letsencrypt/archive/www.lambdaspace.gr:/etc/letsencrypt/archive/www.lambdaspace.gr:ro
    depends_on: mqtt
    restart: always

  redirector:
    image: nginx:stable-alpine
    volumes:
      - ./redirector-nginx.conf:/etc/nginx/nginx.conf:ro
      - /etc/letsencrypt/live/techministry.rocks:/etc/letsencrypt/live/techministry.rocks:ro
      - /etc/letsencrypt/archive/techministry.rocks:/etc/letsencrypt/archive/techministry.rocks:ro
    expose:
      - "80"
      - "443"
    restart: always

  proxy:
    build:
      context: .
      dockerfile: HAProxy-Dockerfile
    links:
      - website
      - redirector
    external_links:
      - app:discourse
    ports:
      - "80:80"
      - "443:443"
    restart: always

  ministerin:
    build:
      context: .
      dockerfile: MinisterIN-Dockerfile
    ports:
      - "7777:7777"
    depends_on: mqtt
    restart: always

  mqtt:
    build:
      context: .
      dockerfile: MQTT-Dockerfile
    volumes:
      - "credentials/mqtt:/var/local/mosquitto"
    ports:
      - "8883:8883"
    restart: always

Add mqtt broker, always restart containers
Add mqtt broker, always restart containers
