version: '3'
services:
  db:
    image: postgres:9.6
    volumes:
      - database:/var/lib/postgresql/data

  backend: &backend
    build: .
    volumes:
      - .:/app
      - gems:/usr/local/bundle
    depends_on:
      - db
    ports:
      - 3000:3000
    env_file: docker/rails/development.env

  backend_test:
    <<: *backend
    command: ["bundle", "exec", "guard"]
    ports: []
    env_file: docker/rails/test.env

  rate_updater:
    <<: *backend
    depends_on:
      - db
    ports: []
    command: ["bundle", "exec", "rake", "exchange_rates:update_daemon"]

volumes:
  gems:
  database:

version: '3'
services:
  db:
    image: postgres:9.6
    environment:
      # You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
      # connections without a password. This is *not* recommended.
      # ------------------------------------------
      # but for local app we may use it, right? ;)
      - POSTGRES_HOST_AUTH_METHOD=trust
    volumes:
      - database:/var/lib/postgresql/data

  backend: &backend
    build: .
    volumes:
      - .:/app
      - gems:/usr/local/bundle
    depends_on:
      - db
    ports:
      - 3000:3000
    env_file: docker/rails/development.env

  backend_test:
    <<: *backend
    command: ["bundle", "exec", "guard"]
    ports: []
    env_file: docker/rails/test.env

  rate_updater:
    <<: *backend
    depends_on:
      - db
    ports: []
    command: ["bundle", "exec", "rake", "exchange_rates:update_daemon"]

volumes:
  gems:
  database:

Fix postgres not allowing empty root pass
Fix postgres not allowing empty root pass
