andrewrreed's picture
andrewrreed HF Staff
create proper role for postgres user and run
77a2880
raw
history blame
770 Bytes
FROM langfuse/langfuse:2
USER root
# Install PostgreSQL and necessary dependencies
RUN apk update && apk add --no-cache \
postgresql \
postgresql-contrib \
shadow
# Create postgres user and group
RUN addgroup -S postgres && adduser -S -G postgres postgres
# 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
# Copy and set up the wrapper script
COPY docker-entrypoint-wrapper.sh /docker-entrypoint-wrapper.sh
RUN chmod +x /docker-entrypoint-wrapper.sh
EXPOSE 3000 5432
ENTRYPOINT ["dumb-init", "--", "/docker-entrypoint-wrapper.sh"]