title: Unable to run queries from a file using psql command line with docker exec
body: <p>I have a bash file should bring the postgres docker container online and then run a <code>.sql</code> file to create the databases. But it's throwing the error.</p>
  
  <pre><code>psql: error: provision-db.sql: No such file or directory
  </code></pre>
  
  <p>I have checked the path and the file exists at the same level of this bash script. Following is the content of my bash file.</p>
  
  <pre><code>#!/usr/bin/env bash
  
  docker-compose up -d db
  
  # Ensure the Postgres server is online and usable
  until docker exec -i boohoo.postgres pg_isready --host="${POSTGRES_HOST}" --username="${POSTGRES_USER}"
  do
      echo "."
      sleep 1
  done
  
  docker exec -i boohoo.postgres psql -h "${POSTGRES_HOST}" -U "${POSTGRES_USER}" -a -q -f provision-db.sql
  </code></pre>
  
  <p>And this is the <code>provision-db.sql</code> file.</p>
  
  <pre><code>DROP DATABASE "boo-hoo";
  CREATE DATABASE "boo-hoo";
  GRANT ALL PRIVILEGES ON DATABASE "boo-hoo" TO postgres;
  </code></pre>
  
  <p>This is the part of <code>docker-compose.yml</code></p>
  
  <pre><code>version: '3.3'
  
  services:
    db:
      container_name: boohoo.postgres
      hostname: postgres.boohoo
      image: postgres
      ports:
        - "15432:5432"
      environment:
        POSTGRES_USER: "postgres"
        POSTGRES_PASSWORD: "postgres"
  </code></pre>