Update Dockerfile
Browse filesDockerfile updated
- Dockerfile +20 -1
Dockerfile
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
|
|
| 1 |
FROM typesense/typesense:30.1
|
|
|
|
|
|
|
| 2 |
ENV TYPESENSE_DATA_DIR=/data
|
| 3 |
ENV TYPESENSE_API_KEY=v3ct0r-d0m41n-s34rch
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
CMD ["/opt/typesense-server", "--data-dir", "/data", "--api-port", "7860", "--api-key", "your_very_secret_key"]
|
|
|
|
| 1 |
+
# Use the version mentioned in your logs (30.1)
|
| 2 |
FROM typesense/typesense:30.1
|
| 3 |
+
|
| 4 |
+
# Set environment variables
|
| 5 |
ENV TYPESENSE_DATA_DIR=/data
|
| 6 |
ENV TYPESENSE_API_KEY=v3ct0r-d0m41n-s34rch
|
| 7 |
+
ENV TYPESENSE_API_PORT=7860
|
| 8 |
+
|
| 9 |
+
# Switch to root to create the directory and fix permissions
|
| 10 |
+
USER root
|
| 11 |
+
|
| 12 |
+
# 1. Create the data directory
|
| 13 |
+
# 2. Ensure it belongs to the user Hugging Face uses (UID 1000)
|
| 14 |
+
RUN mkdir -p /data && chown -R 1000:1000 /data
|
| 15 |
+
|
| 16 |
+
# Switch back to the Hugging Face user
|
| 17 |
+
USER 1000
|
| 18 |
+
|
| 19 |
+
# Expose the port HF expects
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
|
| 22 |
+
# Start Typesense
|
| 23 |
+
# Note: We must explicitly tell Typesense where the data-dir is in the command
|
| 24 |
CMD ["/opt/typesense-server", "--data-dir", "/data", "--api-port", "7860", "--api-key", "your_very_secret_key"]
|