Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +8 -18
Dockerfile
CHANGED
|
@@ -1,26 +1,16 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
#
|
| 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
|
| 23 |
-
EXPOSE
|
| 24 |
|
| 25 |
-
# Start
|
| 26 |
-
CMD
|
|
|
|
| 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"]
|