version: '2'
services:
  append:
    image: rstudio/plumber
    command: '/examples/01-append/appender.R'
    volumes:
     - ../examples:/examples
    restart: always
  filters:
    image: rstudio/plumber
    command: '/examples/02-filters/filters.R'
    volumes:
     - ../examples:/examples
    restart: always
  github:
    build: ../examples/03-github/
    volumes:
     - ../examples:/examples
    restart: always
  sessions:
    build: ../examples/06-sessions/
    volumes:
     - ../examples:/examples
    restart: always
  mailgun:
    build: ../examples/07-mailgun/
    volumes:
     - ../examples:/examples
    restart: always
  nginx:
    image: nginx:1.9
    ports:
     - "80:80"
    volumes:
     - ./nginx.conf:/etc/nginx/nginx.conf:ro
    restart: always
    depends_on:
     - append
     - sessions
     - mailgun
     - filters
     - github
