meltano install would resolve it from pip_url, but five of the six custom taps are also installed explicitly and a new plugin failing to appear is not something you want to debug from a deploy log. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BvdDKvFFSZuMVDH5fEyTob
44 lines
1.2 KiB
Docker
44 lines
1.2 KiB
Docker
FROM python:3.13-slim
|
|
|
|
WORKDIR /opt/pipeline
|
|
|
|
# System dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
libpq-dev \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Install custom Singer taps
|
|
COPY plugins/ plugins/
|
|
RUN pip install --no-cache-dir \
|
|
./plugins/extractors/tap-uk-gias \
|
|
./plugins/extractors/tap-uk-ees \
|
|
./plugins/extractors/tap-uk-ees-destinations \
|
|
./plugins/extractors/tap-uk-ofsted \
|
|
./plugins/extractors/tap-uk-fbit \
|
|
./plugins/extractors/tap-uk-idaci
|
|
|
|
# Copy pipeline code
|
|
COPY meltano.yml .
|
|
COPY transform/ transform/
|
|
COPY scripts/ scripts/
|
|
COPY dags/ dags/
|
|
|
|
# Initialize Meltano project (generates catalog, installs target-postgres)
|
|
RUN meltano install
|
|
|
|
# dbt deps — invoke via the Python module so the classic dbt-postgres engine
|
|
# is used, not a standalone dbt Fusion binary that may shadow it on PATH.
|
|
RUN cd transform && python -m dbt.cli.main deps --profiles-dir . 2>/dev/null || true
|
|
|
|
ENV AIRFLOW_HOME=/opt/airflow
|
|
ENV AIRFLOW__CORE__DAGS_FOLDER=/opt/pipeline/dags
|
|
ENV PYTHONPATH=/opt/pipeline
|
|
|
|
CMD ["airflow", "api-server"]
|