From 531f42c76417b39d11d925fbc71ac457214759c6 Mon Sep 17 00:00:00 2001 From: Andrei Markin Date: Thu, 26 Oct 2023 20:54:37 +0400 Subject: [PATCH] Update Dockerfile with correct path Update documentation on running dActionBoard in airflow Change-Id: I3e94f89dd59d8e4303433ebefdca6cc95848b5ba --- Dockerfile | 16 +++++++--------- docs/running-dactionboard-in-apache-airflow.md | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3815ea..dcdc0ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ -FROM ghcr.io/google/gaarf-py -WORKDIR /app -ADD google_ads_queries/ google_ads_queries/ -ADD bq_queries/ bq_queries/ -COPY scripts/ scripts/ -COPY run-local.sh . -RUN chmod a+x run-local.sh -ENV GOOGLE_APPLICATION_CREDENTIALS service_account.json -ENTRYPOINT ["./run-local.sh", "--quiet"] +FROM python:3.10-slim-buster +COPY app/requirements.txt requirements.txt +RUN --mount=type=cache,target=/root/.cache pip install --require-hashes -r requirements.txt --no-deps +COPY app app +ENV GOOGLE_APPLICATION_CREDENTIALS app/service_account.json + +ENTRYPOINT ["./app/run-local.sh", "--quiet"] CMD ["--google-ads-config", "/google-ads.yaml", "--config", "/dactionboard.yaml"] diff --git a/docs/running-dactionboard-in-apache-airflow.md b/docs/running-dactionboard-in-apache-airflow.md index e38a4cf..7608fad 100644 --- a/docs/running-dactionboard-in-apache-airflow.md +++ b/docs/running-dactionboard-in-apache-airflow.md @@ -40,7 +40,7 @@ with DAG('dactionboard', default_args=default_args, schedule_interval="* 0 * * * mounts=[ Mount( source="/path/to/service_account.json", - target="/service_account.json", + target="/app/service_account.json", type="bind"), Mount( source="/path/to/google-ads.yaml",