feat: fix dagster setup

This commit is contained in:
Stijnvandenbroek
2026-03-03 21:09:00 +00:00
parent 7dd520cf41
commit f56330a3d1
5 changed files with 22 additions and 4 deletions

View File

@@ -15,3 +15,6 @@ COPY . .
# Make the venv's binaries available on PATH # Make the venv's binaries available on PATH
ENV PATH="/app/.venv/bin:$PATH" ENV PATH="/app/.venv/bin:$PATH"
ENV DAGSTER_HOME=/app/dagster_home ENV DAGSTER_HOME=/app/dagster_home
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]

View File

@@ -1,5 +1,4 @@
-- Placeholder staging model. -- Placeholder staging model.
-- Replace this with your actual source query, e.g.: -- Replace with your actual source query using the source() macro.
-- select * from {{ source('my_source', 'my_table') }}
select 1 as id, 'example' as name select 1 as id, 'example' as name

View File

@@ -6,6 +6,10 @@ x-dagster: &dagster-common
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
env_file: .env env_file: .env
environment:
DAGSTER_HOME: /app/dagster_home
volumes:
- dbt-target:/app/dbt/target
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
@@ -49,3 +53,4 @@ services:
volumes: volumes:
postgres-data: postgres-data:
dbt-target:

7
entrypoint.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -e
echo "Generating dbt manifest..."
dbt parse --profiles-dir /app/dbt --project-dir /app/dbt
exec "$@"

View File

@@ -18,8 +18,12 @@ build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
packages = ["data_platform"] packages = ["data_platform"]
[tool.uv] [tool.dagster]
dev-dependencies = [ module_name = "data_platform"
attribute = "defs"
[dependency-groups]
dev = [
"pytest", "pytest",
"dagster-webserver", "dagster-webserver",
] ]