diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml index 40ecc29610..24dcac18a6 100644 --- a/.devcontainer/compose.yml +++ b/.devcontainer/compose.yml @@ -12,3 +12,18 @@ services: - ..:/home/calitp/app - ~/.dbt:/home/calitp/.dbt - ~/.config/gcloud:/home/calitp/.config/gcloud + + dbt: + build: + context: .. + dockerfile: .devcontainer/Dockerfile + image: data_infra:dev + entrypoint: ["poetry", "run", "dbt"] + environment: + - DBT_PROFILES_DIR=/home/calitp/.dbt + - GOOGLE_APPLICATION_CREDENTIALS=/home/calitp/.config/gcloud/application_default_credentials.json + volumes: + - ..:/home/calitp/app + - ~/.dbt:/home/calitp/.dbt + - ~/.config/gcloud:/home/calitp/.config/gcloud + working_dir: /home/calitp/app/warehouse diff --git a/warehouse/dbt.sh b/warehouse/dbt.sh deleted file mode 100755 index 089316bed9..0000000000 --- a/warehouse/dbt.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -docker build -t local-dbt -f Dockerfile.local . -docker run --entrypoint dbt -e GOOGLE_APPLICATION_CREDENTIALS=/gcloud_config/application_default_credentials.json -v ~/.dbt:/local_dbt -v ~/.config/gcloud:/gcloud_config -v $(pwd):/app local-dbt "$@" --profiles-dir /local_dbt