Hi! Im trying to run elementary in a container wit...
# community-support
p
Hi! Im trying to run elementary in a container with read-only filesystem except for one folder and strict internett access. I noticed that elementary run
dbt deps
in its own dbt project inside
site-packages
to download dbt packages even if
--project-dir
is defined. Is there a easy way to circumvent this or do I have to manually run dbt deps inside
site-packages
in the container build step? See 🧵 for logs.
✅ 1
Command i run. Notice that
--project-dir
and
--profiles-dir
is using the same variable (
DBT_PATH
).
Copy code
edr send-report \
    --slack-token $TOKEN \
    --slack-channel-name $CHANNEL_INFO \
    --profiles-dir $DBT_PATH \
    --project-dir $DBT_PATH \
    --target-path $EDR_TARGET_PATH \
    --config-dir $SCRIPTPATH \
    --disable-samples true
Output in log:
Copy code
2023-11-23 11:47:34 — INFO — Running with edr=0.12.0
2023-11-23 11:47:34 — INFO — Running dbt --log-format json deps --project-dir /Users/patrick/git/vdl-faktura/elementary/.venv/lib/python3.11/site-packages/elementary/monitor/dbt_project --profiles-dir /Users/patrick/git/vdl-faktura/dbt
d
Hey @Patrick Pedersen (NAV), Elementary checks if its dependencies are up to date, and does
dbt deps
only if they are not. So, running
dbt deps
as a build step will solve it.
p
That’s ok. But just for curiosity, what is the cli flag
--project-dir
supposed to do? I can’t see any difference in behaviour if elementary finds my project or not.
Something you could consider is bundling the dbt_packages inside the elementary dbt_project.