You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/19 23:48:52 UTC

[GitHub] [airflow] kaxil edited a comment on issue #13679: SQL Syntax errors on startup

kaxil edited a comment on issue #13679:
URL: https://github.com/apache/airflow/issues/13679#issuecomment-763216757


   I was not able to reproduce the issue. Your docker-compose file contains issues like duplicate contain name: `af_initdb` and it contains no scheduler, and does not create an admin account. And I am not sure why you had initdb and upgradedb both.
   
   The following `docker-compose.yml` emulates what you did in your docker-compose file
   
   ```yaml
   version: "3.2"
   networks:
       airflow:
           driver: bridge
   
   volumes:
     postgres_data:
       driver: local
   
   services:
       postgres:
           container_name: af_postgres
           image: postgres:9.6
           environment:
               - POSTGRES_USER=airflow
               - POSTGRES_DB=airflow
               - POSTGRES_PASSWORD=airflow
           volumes:
               - postgres_data:/var/lib/postgresql/data
           command: >
               postgres
               -c listen_addresses=*
               -c logging_collector=on
               -c log_destination=stderr
           networks:
               - airflow
       webserver:
           container_name: af_webserver
           image: docker.io/apache/airflow:2.0.0-python3.7
           environment:
               - AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
           ports:
               - 80:8080
           depends_on:
               - postgres
           command: bash -c 'airflow db upgrade && airflow users  create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin && airflow webserver'
           networks:
               - airflow
   ```
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org