Spaces:
Runtime error
Runtime error
FROM getmeili/meilisearch:v1.10 | |
# Set environment variables | |
ENV MEILI_HTTP_ADDR=0.0.0.0:7700 | |
ENV MEILI_NO_ANALYTICS=true | |
ENV MEILI_DB_PATH=/data/data.ms | |
ENV MEILI_ENV=development | |
# Expose the default MeiliSearch HTTP port to the host | |
EXPOSE 7700 | |
# Create and set the MeiliSearch data directory | |
RUN mkdir -p /data | |
VOLUME /data | |
# Use a multi-stage build to handle the secret | |
FROM scratch AS secrets | |
COPY --from=0 / / | |
RUN --mount=type=secret,id=MEILI_MASTER_KEY,target=/run/secrets/MEILI_MASTER_KEY \ | |
cat /run/secrets/MEILI_MASTER_KEY > /meili_master_key | |
# Final stage | |
FROM scratch | |
COPY --from=secrets / / | |
ENTRYPOINT ["tini", "--"] | |
CMD ["/bin/sh", "-c", "/bin/meilisearch --master-key $(cat /meili_master_key)"] |