Chris4K commited on
Commit
7eaf6a0
·
verified ·
1 Parent(s): deed3c6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -18
Dockerfile CHANGED
@@ -1,26 +1,16 @@
1
- FROM postgres:15
2
 
3
- # Install Langfuse dependencies
4
- RUN apt-get update && apt-get install -y curl
5
-
6
- # Install Node.js
7
- RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
8
- RUN apt-get install -y nodejs
9
-
10
- # Install Langfuse
11
- RUN npm install -g langfuse
12
-
13
- # Generate secrets
14
  RUN openssl rand -base64 32 > /nextauth_secret.txt
15
 
16
- # Set environment variables
17
  ENV DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langfuse
 
18
  ENV POSTGRES_PASSWORD=postgres
19
  ENV POSTGRES_DB=langfuse
20
- ENV NEXTAUTH_SECRET=$(cat /nextauth_secret.txt)
21
 
22
- # Expose ports
23
- EXPOSE 5432 3000
24
 
25
- # Start PostgreSQL and Langfuse
26
- CMD service postgresql start && langfuse
 
1
+ FROM langfuse/langfuse:latest
2
 
3
+ # Generate a secure random secret
 
 
 
 
 
 
 
 
 
 
4
  RUN openssl rand -base64 32 > /nextauth_secret.txt
5
 
6
+ # Set required environment variables
7
  ENV DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langfuse
8
+ ENV NEXTAUTH_SECRET=$(cat /nextauth_secret.txt)
9
  ENV POSTGRES_PASSWORD=postgres
10
  ENV POSTGRES_DB=langfuse
 
11
 
12
+ # Expose the port Langfuse runs on
13
+ EXPOSE 3000
14
 
15
+ # Start Langfuse
16
+ CMD ["sh", "-c", "langfuse"]