FROM langfuse/langfuse:2 USER root # Install PostgreSQL and necessary dependencies RUN apk update && apk add --no-cache \ postgresql \ postgresql-contrib # Create postgres user and data directory RUN mkdir -p /var/lib/postgresql/data && \ chown -R postgres:postgres /var/lib/postgresql/data && \ chmod 0700 /var/lib/postgresql/data # Set up environment variables ENV DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres ENV NEXTAUTH_SECRET=mysecret ENV SALT=mysalt ENV ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 ENV NEXTAUTH_URL=http://localhost:3000 # Create a wrapper script that will start Postgres before running the original entrypoint COPY <