You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/08/17 21:24:08 UTC

[GitHub] [airflow] potiuk commented on issue #33484: Web server restart from airflow cli

potiuk commented on issue #33484:
URL: https://github.com/apache/airflow/issues/33484#issuecomment-1683000239

   This is your misunderstanding how docker and docker compose works not airflow CLI missing,
   
   Docker and docker compose work in the way that they are immutable and one containr = one process. once the container is closed, it disappears and it can be recreated from the image that it was created. This is the basic docker feature and you have to understand that if you want to use docker and docker compose. If you want to iterate and change dependencies dynamically and restart Python interpreters, you shuld likely not use docker compose. Though (if you read the docmentation and docker compose of ours) you can have some ways of achieving it:
   
   * standard docker compose approach - you can add your own Dockerfile with your requirements and get it rebuild when you restart it. see this comment in the docker compose of ours:
   
   ```
     # In order to add custom dependencies or upgrade provider packages you can use your extended image.
     # Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml
     # and uncomment the "build" line below, Then run `docker-compose build` to build the images.
     image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.6.3}
     # build: .
   ```
   
   * we also have `_PIP_ADDITIONAL_REQUIREMENTS` - see https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#environment-variables-supported-by-docker-compose that an allow you to automatically add requirements when you restart the container - dynamically. Absolutely not recommended for production but good for quicker iterations.
   
   * also if you do not like docker and docker-compose behaviour of containers that are started from images that you build upfront, you might not use that and run your Airflow in a virtual environment. https://airflow.apache.org/docs/apache-airflow/stable/start.html - there you can stop and restart processes as you see fit.
   
   None of that has anything to do with airflow's CLI allowing to stop/start webserver.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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