title: how to set Postgres as backend database in Airflow?
body: <p>I am trying to build the connection between the postgres and airflow, here is my docker-compose</p>
  <pre><code>version: '3'
  services:
      postgres:
          image: postgres
          environment:
              - POSTGRES_USER=airflow
              - POSTGRES_PASSWORD=airflow
              - POSTGRES_DB=airflow
      webserver:
          image: apache/airflow:1.10.13-python3.6
          command: bash -c &quot;airflow initdb; airflow webserver; airflow scheduler;&quot;
          environment:
              - AIRFLOW_DATABASE_USERNAME=airflow
              - AIRFLOW_DATABASE_PASSWORD=airflow
              - AIRFLOW_DATABASE_NAME=airflow
          volumes:
              - ../airflow/dag:/opt/airflow/dags
          ports:
             - 8080:8080
  </code></pre>
  <p>After setting the postgres configuration setting it's still taking the SQLite as backend database. Logs as follow</p>
  <pre><code>ravi@ravi:~/Documents/airflow$ docker-compose up airflow_webserver 
  Starting airflow_airflow_webserver_1 ... 
  Starting airflow_airflow_webserver_1 ... done
  Attaching to airflow_airflow_webserver_1
  airflow_webserver_1  | DB: sqlite:////opt/airflow/airflow.db
  airflow_webserver_1  | [2020-12-06 12:53:22,911] {db.py:378} INFO - Creating tables
  airflow_webserver_1  | INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
  airflow_webserver_1  | INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  airflow_webserver_1  | Done.
  </code></pre>