version: "3"

volumes:
  alcarin_api_data:

services:
  web:
    image: node:9.11-slim
    working_dir: /code
    command: npm start
    volumes:
      - ./alcarin_frontend:/code
    ports:
      - "8080:3000"
      - "9485:9485"

  api:
    build: ./alcarin_api
    working_dir: /code
    command: mix phx.server
    volumes:
      - ./alcarin_api:/code
    ports:
      - "4000:4000"
    depends_on:
      - postgres
    links:
      - postgres:postgres.link

  postgres:
    image: postgres:9.6
    volumes:
      - alcarin_api_data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: alcarin
      POSTGRES_PASSWORD: alcarin
      POSTGRES_DB: alcarin
    ports:
      - "5432:5432"

version: "3"

volumes:
  alcarin_api_data:

services:
  web:
    image: node:9.11-slim
    working_dir: /code
    command: npm start
    volumes:
      - ./alcarin_frontend:/code
    ports:
      - "8080:3000"
      - "9485:9485"

  api:
    build: ./alcarin_api
    working_dir: /code
    command: mix phx.server
    environment:
      - DISPLAY
    volumes:
      - ./alcarin_api:/code
      - /tmp/.X11-unix:/tmp/.X11-unix
    ports:
      - "4000:4000"
    depends_on:
      - postgres
    links:
      - postgres:postgres.link

  postgres:
    image: postgres:9.6
    volumes:
      - alcarin_api_data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: alcarin
      POSTGRES_PASSWORD: alcarin
      POSTGRES_DB: alcarin
    ports:
      - "5432:5432"

Enable "observer" elixir tool on docker container
Enable "observer" elixir tool on docker container
[api]
