Chris4K commited on
Commit
c9dd907
·
verified ·
1 Parent(s): 6631a53

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -11
Dockerfile CHANGED
@@ -1,19 +1,26 @@
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=secret_from_file
9
  ENV POSTGRES_PASSWORD=postgres
10
  ENV POSTGRES_DB=langfuse
 
11
 
12
- # Read the secret into the environment variable
13
- #RUN export NEXTAUTH_SECRET=$(cat /nextauth_secret.txt)
14
-
15
- # Expose the port Langfuse runs on
16
- EXPOSE 3000
17
 
18
- # Start Langfuse
19
- CMD ["langfuse"]
 
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=secret
21
 
22
+ # Expose ports
23
+ EXPOSE 5432 3000
 
 
 
24
 
25
+ # Start PostgreSQL and Langfuse
26
+ CMD service postgresql start && langfuse