-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from viktor-pecheniuk/vpec/airflow
+ added airflow
- Loading branch information
Showing
32 changed files
with
1,455 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
.idea | ||
target | ||
.DS_Store | ||
.DS_Store | ||
|
||
# python section | ||
*__pycache__ | ||
*.py[cod] | ||
*$py.class | ||
*.pyc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/.dockerignore | ||
**/.git | ||
**/.gitignore | ||
**/__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM python:3.7 | ||
MAINTAINER "[email protected]" | ||
|
||
# Airflow setup | ||
ARG AIRFLOW_VERSION=1.10.2 | ||
ARG JSON_LOGGER_VERSION=0.1.10 | ||
ARG PROMETHEUS_CLI_VERSION=0.5.0 | ||
ARG K8S_VERSION=9.0.0 | ||
|
||
ENV AIRFLOW_HOME=/app/airflow | ||
ENV SLUGIFY_USES_TEXT_UNIDECODE=yes | ||
ENV PYTHONPATH=$AIRFLOW_HOME | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y supervisor vim \ | ||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& pip install apache-airflow[postgres]==${AIRFLOW_VERSION} \ | ||
&& pip install python-json-logger==${JSON_LOGGER_VERSION} \ | ||
&& pip install prometheus-client==${PROMETHEUS_CLI_VERSION} \ | ||
&& pip install kubernetes==${K8S_VERSION} \ | ||
&& pip install psycopg2 | ||
|
||
# replace owns configs | ||
COPY ./conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
COPY ./conf/airflow.cfg $AIRFLOW_HOME/airflow.cfg | ||
|
||
COPY . $AIRFLOW_HOME/ | ||
RUN rm -rf $AIRFLOW_HOME/conf | ||
|
||
# run tests before deploy | ||
RUN airflow initdb \ | ||
&& cd $AIRFLOW_HOME && python -m unittest tests/unit/* | ||
|
||
EXPOSE 5001 | ||
|
||
CMD ["/usr/bin/supervisord"] |
Oops, something went wrong.