Skip to content

Commit

Permalink
Additional config
Browse files Browse the repository at this point in the history
  • Loading branch information
luabida committed Dec 26, 2023
1 parent 1621939 commit 99ed4fd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ _AIRFLOW_WWW_USER_CREATE=${_AIRFLOW_WWW_USER_CREATE:-True}
_AIRFLOW_WWW_USER_USERNAME=${_AIRFLOW_WWW_USER_USERNAME}
_AIRFLOW_WWW_USER_PASSWORD=${_AIRFLOW_WWW_USER_PASSWORD}
_AIRFLOW_WWW_USER_EMAIL=${_AIRFLOW_WWW_USER_EMAIL}
_AIRFLOW_WWW_USER_FIRST_NAME=${_AIRFLOW_WWW_USER_FIRST_NAME}
_AIRFLOW_WWW_USER_LAST_NAME=${_AIRFLOW_WWW_USER_LAST_NAME}
_AIRFLOW_WWW_USER_FIRSTNAME=${_AIRFLOW_WWW_USER_FIRSTNAME}
_AIRFLOW_WWW_USER_LASTNAME=${_AIRFLOW_WWW_USER_LASTNAME}
_AIRFLOW_WWW_USER_ROLE=${_AIRFLOW_WWW_USER_ROLE}
_PIP_ADDITIONAL_REQUIREMENTS=${_PIP_ADDITIONAL_REQUIREMENTS}
AIRFLOW__API__AUTH_BACKENDS=${AIRFLOW__API__AUTH_BACKENDS:-"airflow.api.auth.backend.basic_auth"}
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION=${AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION}
Expand Down
37 changes: 30 additions & 7 deletions containers/compose-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ x-airflow-common:
_AIRFLOW_DB_UPGRADE: ${_AIRFLOW_DB_UPGRADE}
_AIRFLOW_WWW_USER_CREATE: ${_AIRFLOW_WWW_USER_CREATE}
_AIRFLOW_WWW_USER_EMAIL: ${_AIRFLOW_WWW_USER_EMAIL}
_AIRFLOW_WWW_USER_FIRST_NAME: ${_AIRFLOW_WWW_USER_FIRST_NAME}
_AIRFLOW_WWW_USER_LAST_NAME: ${_AIRFLOW_WWW_USER_LAST_NAME}
_AIRFLOW_WWW_USER_FIRSTNAME: ${_AIRFLOW_WWW_USER_FIRSTNAME}
_AIRFLOW_WWW_USER_LASTNAME: ${_AIRFLOW_WWW_USER_LASTNAME}
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD}
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME}
_AIRFLOW_WWW_USER_ROLE: ${_AIRFLOW_WWW_USER_ROLE}
AIRFLOW_FILES_PATH_DIR_HOST: ${AIRFLOW_FILES_PATH_DIR_HOST}
AIRFLOW_PORT: ${AIRFLOW_PORT}
AIRFLOW__API__AUTH_BACKENDS: ${AIRFLOW__API__AUTH_BACKENDS}
Expand Down Expand Up @@ -122,6 +123,28 @@ services:
volumes:
- redis:/data

flower:
platform: linux/amd64
image: mher/flower:0.9.7
restart: unless-stopped
env_file:
- ../.env
depends_on:
- redis
command: [
"flower",
"--broker=redis://redis:6379/0",
"--port=8888",
"--basic_auth=admin:${FLOWER_PASSWORD}"]
ports:
- ${FLOWER_PORT}:8888
healthcheck:
test: ["CMD", "wget", "--quiet", "--spider", "http://localhost:8888/healthcheck"]
interval: 60s
timeout: 10s
retries: 5
start_period: 40s # requires docker-compose 3.4

minio:
platform: linux/amd64
image: quay.io/minio/minio
Expand Down Expand Up @@ -162,7 +185,7 @@ services:
- ${AIRFLOW_PORT}:8080
depends_on:
<<: *airflow-common-depends-on
startup:
airflow_startup:
condition: service_completed_successfully

airflow_scheduler:
Expand All @@ -180,7 +203,7 @@ services:
restart: always
depends_on:
<<: *airflow-common-depends-on
startup:
airflow_startup:
condition: service_completed_successfully

airflow_worker:
Expand All @@ -205,7 +228,7 @@ services:
restart: always
depends_on:
<<: *airflow-common-depends-on
startup:
airflow_startup:
condition: service_completed_successfully

airflow_triggerer:
Expand All @@ -223,7 +246,7 @@ services:
restart: always
depends_on:
<<: *airflow-common-depends-on
startup:
airflow_startup:
condition: service_completed_successfully

airflow_startup:
Expand All @@ -236,7 +259,7 @@ services:
- -c
- |
mkdir -p /sources/logs /sources/dags /sources/plugins
chown -R "${AIRFLOW_UID}:0" /sources/{logs,dags,plugins}
chown -R "${HOST_UID}:0" /sources/{logs,dags,plugins}
exec /entrypoint airflow version
# yamllint enable rule:line-length
environment:
Expand Down

0 comments on commit 99ed4fd

Please sign in to comment.