Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +17 -32
Dockerfile
CHANGED
|
@@ -1,37 +1,22 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
| 20 |
-
COPY . .
|
| 21 |
-
RUN npm install
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
ENV POSTGRES_USER=pgstac \
|
| 25 |
-
POSTGRES_PASSWORD=pgstac \
|
| 26 |
-
POSTGRES_DB=postgis \
|
| 27 |
-
POSTGRES_HOST=127.0.0.1 \
|
| 28 |
-
POSTGRES_PORT=5432
|
| 29 |
-
|
| 30 |
-
# Set up a supervisor to run both Postgres and Langfuse
|
| 31 |
-
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
| 32 |
-
|
| 33 |
-
# Expose the default Langfuse port
|
| 34 |
-
EXPOSE 3000
|
| 35 |
-
|
| 36 |
-
# Start Supervisor
|
| 37 |
-
CMD ["/usr/bin/supervisord"]
|
|
|
|
| 1 |
+
# Use the official Langfuse image
|
| 2 |
+
FROM langfuse/langfuse:latest
|
| 3 |
|
| 4 |
+
# Set environment variables for a minimal, ephemeral setup
|
| 5 |
+
ENV DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langfuse
|
| 6 |
+
ENV NEXTAUTH_SECRET=your_random_secret_here
|
| 7 |
+
ENV SALT=your_random_salt_here
|
| 8 |
+
ENV NEXTAUTH_URL=https://your-space-name.hf.space
|
| 9 |
+
ENV HOSTNAME=0.0.0.0
|
| 10 |
+
ENV PORT=7860
|
| 11 |
|
| 12 |
+
# Use an in-memory SQLite database for HF Spaces
|
| 13 |
+
# Note: This is not recommended for production, only for demonstration
|
| 14 |
+
ENV DATABASE_TYPE=sqlite
|
| 15 |
|
| 16 |
+
# Disable signup if needed
|
| 17 |
+
ENV AUTH_DISABLE_SIGNUP=true
|
|
|
|
| 18 |
|
| 19 |
+
# Expose the default Hugging Face Spaces port
|
| 20 |
+
EXPOSE 7860
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
# The default CMD from the Langfuse image should work
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|