Skip to content

Commit

Permalink
Merge pull request #114 from Synthetixio/fix-airflow
Browse files Browse the repository at this point in the history
Fix airflow
  • Loading branch information
Tburm authored Sep 11, 2024
2 parents bebe166 + 25cd26b commit cf57eb4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scheduler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ USER root
RUN apt-get update && apt-get install -y docker.io

USER airflow
COPY scheduler/entrypoint.sh /entrypoint.sh

# install requirements
COPY scheduler/requirements.txt /requirements.txt
Expand All @@ -18,4 +17,6 @@ RUN pip install --no-cache-dir -r /transformers_requirements.txt
ENV AIRFLOW__CORE__LOAD_EXAMPLES=False
ENV AIRFLOW__WEBSERVER__RBAC=True

COPY scheduler/entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
4 changes: 4 additions & 0 deletions scheduler/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

source /home/airflow/venv/bin/activate
dbt deps --project-dir /opt/synthetix
source deactivate

airflow db upgrade
airflow users create -r Admin -u admin -p admin -e [email protected] -f admin -l user || true
airflow webserver --port 8080 &
Expand Down
4 changes: 4 additions & 0 deletions transformers/synthetix/package-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages:
- package: dbt-labs/dbt_utils
version: 1.1.1
sha1_hash: a158c48c59c2bb7d729d2a4e215aabe5bb4f3353

0 comments on commit cf57eb4

Please sign in to comment.