version: "2"

services:
  postgres:
    logging:
      driver: none
    image: "postgres:9.3.24"
    environment:
      POSTGRES_PASSWORD: "secret"
      POSTGRES_USER: "hydra"
    ports:
      - "5432:5432"
  hydra:
    depends_on:
      - postgres
    ports:
    - "8050:80"
    build:
      context: ./
      args:
        - PACKAGE_NAME=hydra
    command: migrate-and-run
    env_file:
      - hydra.env
    restart: on-failure
    links:
      - postgres
