File size: 614 Bytes
538f0d2 8ea2c30 faf93ff 538f0d2 8ea2c30 faf93ff 538f0d2 faf93ff 538f0d2 faf93ff 538f0d2 faf93ff 538f0d2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Use the official v30.1 image
FROM typesense/typesense:30.1
# 1. Set internal environment defaults
ENV TYPESENSE_DATA_DIR=/data
ENV TYPESENSE_API_PORT=7860
# 2. Permissions Setup (Root required for mkdir/chown)
USER root
RUN mkdir -p /data && chown -R 1000:1000 /data
# 3. Switch back to HF standard user
USER 1000
# 4. Expose the port HF expects (mapped to 443 externally)
EXPOSE 7860
# 5. Optimized Startup Command
# Removed --api-key so it uses the 'TYPESENSE_API_KEY' Secret from HF Settings
CMD ["/opt/typesense-server", \
"--data-dir", "/data", \
"--api-port", "7860", \
"--enable-cors"] |