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_r407081546
 
 

 ##########
 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:
   I think we do not need to get them auto-generated in the prod version. The 
main reason they are auto-generated is that I wanted to keep the the same in 
docker-compose and in the scripts which are running pre-commit checks. 
Pre-commit checks do not use docker compose but they are running docker run 
commands directly. This only makes sense for CI image. For prod image it's ok 
to keep separate list I think - most of the pre-commit/testrelated files might 
be misleading/are unnecessary in the production image. 

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