evertramos / nginx-proxy-automation

Automated docker nginx proxy integrated with letsencrypt.
MIT License
2.66k stars 632 forks source link

Running airflow #346

Closed syntaxgirl closed 2 years ago

syntaxgirl commented 2 years ago

I tried to setup airflow but it fails as soon as I add things needed for it to be on proxy network, airflow is shown up on the domain name, ssl works correctly, but login fails after that. If I revert it it works again on fixed port but without proxy.

The docker-compose I am using is the official one: https://airflow.apache.org/docs/apache-airflow/2.1.4/docker-compose.yaml

I tried to add network to the web service, but that didn't worked out. I have set it to be default for all services, same thing, login didn't worked out.

Can anyone take a look and maybe help out?

evertramos commented 2 years ago

Hello There!

Did you figure it out how to use it with flow? As my point of view the only change you need would be:

 airflow-webserver:
    <<: *airflow-common
    command: webserver
#    ports:
#      - 8080:8080
    healthcheck:
      test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
      interval: 10s
      timeout: 10s
      retries: 5
    restart: always
    depends_on:
      <<: *airflow-common-depends-on
      airflow-init:
        condition: service_completed_successfully
    environment:
      VIRTUAL_PORT: 8080
      VIRTUAL_HOST: yourdomain.com.br
      LETSENCRYPT_HOST: yourdomain.com.br
      LETSENCRYPT_EMAIL: you@yourdomain.com.br

Give it a try and let us know if it worked.

Gby!