# Start from a base Python image FROM python:3.11-slim # Install system dependencies RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential curl wget postgresql postgresql-contrib nodejs npm supervisor && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Set up a working directory WORKDIR /app # Install Langfuse dependencies COPY ./requirements.txt requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Install Node.js dependencies for Langfuse RUN npm install -g npm@latest COPY . . RUN npm install # Set up environment variables (for in-memory Postgres) ENV POSTGRES_USER=pgstac \ POSTGRES_PASSWORD=pgstac \ POSTGRES_DB=postgis \ POSTGRES_HOST=127.0.0.1 \ POSTGRES_PORT=5432 # Set up a supervisor to run both Postgres and Langfuse COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Expose the default Langfuse port EXPOSE 3000 # Start Supervisor CMD ["/usr/bin/supervisord"]