From be5211dcb90e193310985de3d61b19984e3d4c35 Mon Sep 17 00:00:00 2001 From: Andrei Markin Date: Tue, 9 May 2023 12:53:27 +0400 Subject: [PATCH] Switch to using run-local.sh in Dockerfile Change-Id: I7d534b5c48cd8bd99036ad9616221e8bb69e2fab --- Dockerfile | 8 +++++--- README.md | 2 +- dashboard_answers.json | 2 +- scripts/run-docker.sh | 25 ------------------------- 4 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 scripts/run-docker.sh diff --git a/Dockerfile b/Dockerfile index 9de82c8..c9f3cfe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM ghcr.io/google/gaarf-py ADD google_ads_queries/ google_ads_queries/ ADD bq_queries/ bq_queries/ -ADD scripts/run-docker.sh . -RUN chmod a+x run-docker.sh +COPY scripts/ scripts/ +COPY run-local.sh . +RUN chmod a+x run-local.sh ENV GOOGLE_APPLICATION_CREDENTIALS service_account.json -ENTRYPOINT ["./run-docker.sh"] +ENTRYPOINT ["./run-local.sh", "--quiet"] +CMD ["--google-ads-config", "/google-ads.yaml", "--config", "/dactionboard.yaml"] diff --git a/README.md b/README.md index fe7f66a..feae3fb 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ You can run dActionBoard queries inside a Docker container. ``` sudo docker run \ - -v /path/to/google-ads.yaml.json:/google-ads.yaml \ + -v /path/to/google-ads.yaml:/google-ads.yaml \ -v /path/to/dactionboard.yaml:/config.yaml \ -v /path/to/service_account.json:/service_account.json \ ghcr.io/google/dactionboard diff --git a/dashboard_answers.json b/dashboard_answers.json index 72bc29b..3b4dc26 100644 --- a/dashboard_answers.json +++ b/dashboard_answers.json @@ -1,5 +1,5 @@ { - "report_id": "ad41d2ca-1d20-43a2-97b8-6cfa141e0f7a", + "dashboard_id": "ad41d2ca-1d20-43a2-97b8-6cfa141e0f7a", "dashboard_name": "dactionboard_copy", "dashboard_datasources": { "vconv": "video_conversion_split", diff --git a/scripts/run-docker.sh b/scripts/run-docker.sh deleted file mode 100644 index a546a7a..0000000 --- a/scripts/run-docker.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -google_ads_config=$1 -config_file=$2 -loglevel=$3 -gaarf google_ads_queries/*/*.sql \ - -c=${config_file:-config.yaml} \ - --ads-config=${google_ads_config:-google-ads.yaml} \ - --loglevel=${loglevel:-"INFO"} -gaarf-bq bq_queries/*.sql \ - -c=${config_file:-config.yaml} \ - --loglevel=${loglevel:-"INFO"}