Skip to content

Commit

Permalink
dockerfile & compose: add triggerer and startup
Browse files Browse the repository at this point in the history
  • Loading branch information
luabida committed Dec 26, 2023
1 parent d8f5d35 commit 1621939
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion containers/airflow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ RUN sudo mkdir -p /opt/scripts /sources /opt/airflow \
&& sudo touch /var/log/colombia_fetch.log \
&& sudo chown -R airflow /var/log/*

ENTRYPOINT [ "/opt/entrypoint.sh" ]
ENTRYPOINT [ "/entrypoint.sh" ]
41 changes: 41 additions & 0 deletions containers/compose-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,47 @@ services:
startup:
condition: service_completed_successfully

airflow_triggerer:
<<: *airflow-common
command: triggerer
image: eph_airflow
hostname: triggerer
container_name: eph_airflow_triggerer
healthcheck:
test: ["CMD-SHELL", 'airflow jobs check --job-type TriggererJob --hostname "$${HOSTNAME}"']
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
restart: always
depends_on:
<<: *airflow-common-depends-on
startup:
condition: service_completed_successfully

airflow_startup:
<<: *airflow-common
entrypoint: /bin/bash
image: eph_airflow
container_name: eph_airflow_startup
# yamllint disable rule:line-length
command:
- -c
- |
mkdir -p /sources/logs /sources/dags /sources/plugins
chown -R "${AIRFLOW_UID}:0" /sources/{logs,dags,plugins}
exec /entrypoint airflow version
# yamllint enable rule:line-length
environment:
<<: *airflow-common-env
_AIRFLOW_DB_UPGRADE: 'true'
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME}
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD}
user: "0:0"
volumes:
- ${AIRFLOW_FILES_PATH_DIR_HOST}:/sources

volumes:
redis:
minio:

0 comments on commit 1621939

Please sign in to comment.