Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +18 -11
Dockerfile
CHANGED
@@ -1,19 +1,26 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#RUN openssl rand -base64 32 > /nextauth_secret.txt
|
5 |
|
6 |
-
# Set
|
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 |
-
#
|
13 |
-
|
14 |
-
|
15 |
-
# Expose the port Langfuse runs on
|
16 |
-
EXPOSE 3000
|
17 |
|
18 |
-
# Start Langfuse
|
19 |
-
CMD
|
|
|
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
|