FROM python:3.11-slim

WORKDIR /app

# Install poetry
RUN pip install poetry

# Copy project files
COPY pyproject.toml ./
RUN poetry config virtualenvs.create false \
    && poetry install --no-interaction --no-ansi --no-root

# Copy code
COPY . .

# Install project
RUN poetry install --no-interaction --no-ansi

EXPOSE 3000

# Default command runs webserver
CMD ["dagster-webserver", "-h", "0.0.0.0", "-p", "3000"]
