use envsubst to configure stuff in dagster.yaml
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Install envsubst
|
||||
RUN apt-get update && apt-get install -y gettext
|
||||
|
||||
# Dagster libraries to run both dagit and the dagster-daemon. Does not
|
||||
# need to have access to any pipeline code.
|
||||
|
||||
FROM python:3.12-slim
|
||||
|
||||
COPY dagster-requirements.txt requirements.txt
|
||||
|
||||
RUN pip install uv
|
||||
@@ -14,6 +17,20 @@ ENV DAGSTER_HOME=/opt/dagster/home/
|
||||
|
||||
RUN mkdir -p $DAGSTER_HOME
|
||||
|
||||
COPY dagster.yaml workspace.yaml $DAGSTER_HOME
|
||||
# COPY dagster.yaml workspace.yaml $DAGSTER_HOME
|
||||
|
||||
# Create entrypoint that renders the dagster.yaml from a template
|
||||
RUN cat << 'EOF' > /entrypoint.sh
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "Rendering dagster.yaml from template..."
|
||||
envsubst < dagster.yaml.template > dagster.yaml
|
||||
|
||||
echo "Starting Dagster: $@"
|
||||
exec "$@"
|
||||
EOF
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
WORKDIR $DAGSTER_HOME
|
||||
|
||||
Reference in New Issue
Block a user