version: '2'
services:
  web:
    build:
      context: .
      dockerfile: Dockerfile.dev
    command: mix phoenix.server
    environment:
      - MIX_ENV=dev
      - DB_USERNAME=root
      - DB_HOST=db
      - DB_NAME=rojak_database
    ports:
      - "${PORT}:4000"
    volumes:
      - .:/app
    links:
      - db
  db:
    image: mysql
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
      - MYSQL_DATABASE=rojak_database
    ports:
      - "${DB_PORT}:3306"

version: '2'
services:
  web:
    build:
      context: .
      dockerfile: Dockerfile.dev
    command: mix phoenix.server
    environment:
      - MIX_ENV=dev
      - DB_USERNAME=root
      - DB_HOST=db
      - DB_NAME=rojak_database
    ports:
      - "${PORT}:4000"
    volumes:
      - .:/app
    links:
      - db

  db:
    image: mysql
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
      - MYSQL_DATABASE=rojak_database
    ports:
      - "${DB_PORT}:3306"

  # Container for building releases. Basically
  # we just reuse the web image but without
  # links and environment variables.
  builder:
    image: rojakapi_web
    ports:
      - "${PORT}:4000"
    volumes:
      - .:/app

Add container for building releases
Add container for building releases
