potiuk commented on a change in pull request #8228: Expose Airflow Webserver 
Port in Production Docker Image
URL: https://github.com/apache/airflow/pull/8228#discussion_r407043149
 
 

 ##########
 File path: scripts/ci/docker-compose/local-prod.yml
 ##########
 @@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+---
+version: "2.2"
+services:
+  airflow:
+    # We need to mount files an directories individually because some files
+    # such apache_airflow.egg-info should not be mounted from host
+    # we only mount those files that it makes sense to edit while developing
+    # or those that might be useful to see in the host as output of the
+    # tests (such as logs)
+    volumes:
+      # START automatically generated volumes from LOCAL_MOUNTS in _utils.sh
+      - ../../../.bash_aliases:/root/.bash_aliases:cached
+      - ../../../.bash_history:/root/.bash_history:cached
+      - ../../../.coveragerc:/opt/airflow/.coveragerc:cached
+      - ../../../.dockerignore:/opt/airflow/.dockerignore:cached
+      - ../../../.flake8:/opt/airflow/.flake8:cached
+      - ../../../.github:/opt/airflow/.github:cached
+      - ../../../.inputrc:/root/.inputrc:cached
+      - ../../../.kube:/root/.kube:cached
+      - ../../../.rat-excludes:/opt/airflow/.rat-excludes:cached
+      - ../../../CHANGELOG.txt:/opt/airflow/CHANGELOG.txt:cached
+      - ../../../Dockerfile.ci:/opt/airflow/Dockerfile.ci:cached
+      - ../../../LICENSE:/opt/airflow/LICENSE:cached
+      - ../../../MANIFEST.in:/opt/airflow/MANIFEST.in:cached
+      - ../../../NOTICE:/opt/airflow/NOTICE:cached
+      - ../../../airflow:/opt/airflow/airflow:cached
+      - ../../../common:/opt/airflow/common:cached
+      - ../../../dags:/opt/airflow/dags:cached
+      - ../../../dev:/opt/airflow/dev:cached
+      - ../../../docs:/opt/airflow/docs:cached
+      - ../../../files:/files:cached
+      - ../../../dist:/dist:cached
+      - ../../../hooks:/opt/airflow/hooks:cached
+      - ../../../logs:/root/airflow/logs:cached
+      - ../../../pylintrc:/opt/airflow/pylintrc:cached
+      - ../../../pytest.ini:/opt/airflow/pytest.ini:cached
+      - ../../../requirements:/opt/airflow/requirements:cached
+      - ../../../scripts:/opt/airflow/scripts:cached
+      - 
../../../scripts/ci/in_container/entrypoint_ci.sh:/entrypoint_ci.sh:cached
+      - ../../../setup.cfg:/opt/airflow/setup.cfg:cached
+      - ../../../setup.py:/opt/airflow/setup.py:cached
+      - ../../../tests:/opt/airflow/tests:cached
+      - ../../../tmp:/opt/airflow/tmp:cached
+      # END automatically generated volumes from LOCAL_MOUNTS in _utils.sh
 
 Review comment:
   Well some of those might be useful as they give a lot of nice things when it 
comes to development. They keep history of commands, you can define your own 
aliases etc + you can for example build backport packages outside (in dist) and 
install them inside the container. Some of the stuff is used for 
pylint/mypy/etc so indeed it is not relevant:
   
   I reviewed the list and I think this - shorter - list might make sense to 
stay:
   
   ```
         - ../../../.bash_aliases:/root/.bash_aliases:cached
         - ../../../.bash_history:/root/.bash_history:cached
         - ../../../.github:/opt/airflow/.github:cached
         - ../../../.inputrc:/root/.inputrc:cached
         - ../../../.kube:/root/.kube:cached
         - ../../../airflow:/opt/airflow/airflow:cached
         - ../../../common:/opt/airflow/common:cached
         - ../../../dags:/opt/airflow/dags:cached
         - ../../../files:/files:cached
         - ../../../dist:/dist:cached
         - ../../../requirements:/opt/airflow/requirements:cached
         - ../../../scripts:/opt/airflow/scripts:cached
         - 
../../../scripts/ci/in_container/entrypoint_ci.sh:/entrypoint_ci.sh:cached
         - ../../../setup.cfg:/opt/airflow/setup.cfg:cached
         - ../../../setup.py:/opt/airflow/setup.py:cached
         - ../../../tests:/opt/airflow/tests:cached
         - ../../../tmp:/opt/airflow/tmp:cached
   ```
   
   And remember we can skip it via `--skip-mounting-local-sources` flag to 
breeze as well - to have a vanilla production container without any mounts.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to