Skip to content

Commit

Permalink
build(docker): upgrade MongoDB from 5.0 to 7.0 and optimize dbt depen…
Browse files Browse the repository at this point in the history
…dency installation
  • Loading branch information
blarghmatey committed Feb 25, 2025
1 parent a58d005 commit a5a802e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions dockerfiles/orchestrate/Dockerfile.global
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN apt update && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*
# Install packages needed to talk to edxapp mongodb
RUN wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - && \
echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main" > /etc/apt/sources.list.d/mongodb-org-5.0.list && \
RUN wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | apt-key add - && \
echo "deb http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" > /etc/apt/sources.list.d/mongodb-org-7.0.list && \
apt update && \
apt install -y mongodb-org-tools && \
apt clean && \
Expand All @@ -34,10 +34,10 @@ USER dagster
EXPOSE 3000
WORKDIR /opt/dagster/code
RUN uv sync --locked --no-dev

RUN cd /opt/dbt && \
uv run --no-dev --directory /opt/dagster/code dbt deps --project-dir /opt/dbt && \
uv run --no-dev --directory /opt/dagster/code dbt ls --project-dir /opt/dbt --profiles-dir /opt/dbt --target dev
ENV DAGSTER_DBT_TARGET=production
RUN --mount=type=secret,id=dbt_trino_username,env=DBT_TRINO_USERNAME \
--mount=type=secret,id=dbt_trino_password,env=DBT_TRINO_PASSWORD \
uv run --no-dev dagster-dbt project prepare-and-package --file /opt/dagster/code/src/ol_orchestrate/assets/lakehouse/dbt.py

# ENTRYPOINTS
# Dagster Daemon
Expand Down
3 changes: 2 additions & 1 deletion src/ol_orchestrate/definitions/lakehouse/elt.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Definitions,
ScheduleDefinition,
define_asset_job,
with_source_code_references,
)
from dagster_airbyte import airbyte_resource, load_assets_from_airbyte_instance
from dagster_dbt import (
Expand Down Expand Up @@ -114,7 +115,7 @@


elt = Definitions(
assets=[full_dbt_project, airbyte_assets],
assets=[with_source_code_references([full_dbt_project]), airbyte_assets],
resources={"dbt": dbt_cli},
sensors=[
AutomationConditionSensorDefinition(
Expand Down

0 comments on commit a5a802e

Please sign in to comment.