Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README with docker info #1

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM python:3.11-alpine

RUN pip install airflow-helper
WORKDIR /app

ENTRYPOINT [ "airflow-helper" ]
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### About the Airflow Helper


![badge1](https://img.shields.io/pypi/v/airflow-helper) ![badge2](https://img.shields.io/pypi/l/airflow-helper) ![badge3](https://img.shields.io/pypi/pyversions/airflow-helper) ![workflow](https://github.com/xnuinside/airflow-helper/actions/workflows/main.yml/badge.svg)
![badge1](https://img.shields.io/pypi/v/airflow-helper) ![badge2](https://img.shields.io/pypi/l/airflow-helper) ![badge3](https://img.shields.io/pypi/pyversions/airflow-helper) ![workflow](https://github.com/xnuinside/airflow-helper/actions/workflows/ci-tests-runner.yml/badge.svg)


It's pretty fresh. Docs maybe not clear yet, keep calm ! I will update them soon :)
Expand Down Expand Up @@ -38,6 +38,8 @@ I can only guarantee that 100% library works with Apache Airflow versions that a

#### Installation

1. With Python in virtualenv from PyPi: https://pypi.org/project/airflow-helper/

```console

pip install airflow-helper
Expand All @@ -50,6 +52,19 @@ I can only guarantee that 100% library works with Apache Airflow versions that a

```

2. With docker image from Docker Hub: https://hub.docker.com/repository/docker/xnuinside/airflow-helper/

``` console

# pull image
docker pull xnuinside/airflow-helper:latest

# sample how to run command

docker run -it xnuinside/airflow-helper:latest --help
```

1. Example, how to use in docker-compose: example/docker-compose-example.yaml

#### Default settings

Expand Down
4 changes: 1 addition & 3 deletions example/airflow_settings_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ airflow:
- id: fs_default
type: File System default
host: localhost
extra:
arg-1: value
arg-2: value
extra: '{"arg-1": "value", "arg-2": "value"}'
21 changes: 14 additions & 7 deletions example/docker-compose-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
version: '3'
x-airflow-common:
&airflow-common
image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.1.2}
build:
context: ../..
dockerfile: docker/Dockerfile
args:
- GITLAB_TOKEN=${GITLAB_TOKEN:?err}
image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.7.3}
environment:
&airflow-common-env
AIRFLOW__CORE__EXECUTOR: CeleryExecutor
Expand All @@ -29,7 +24,7 @@ services:
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- postgres-db-volume:/var/lib/postgresql/data
- db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 5s
Expand All @@ -55,6 +50,18 @@ services:
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}


airflow-helper:
volumes:
- .:/app/configs
image: xnuinside/airflow-helper:latest
command: load /app/configs/airflow_settings_local.yaml --host http://airflow-webserver
depends_on:
postgres:
condition: service_healthy
airflow-webserver:
condition: service_healthy

volumes:
db-volume:
Loading