# Local dev backend: smartbotic-database + smartbotic-vectorapi from the release
# .debs. Native builds are impossible on the Void dev host (protobuf 35 removed
# a header the generated protos need), so the Debian 13 image is the only way to
# run the real stack locally. The web UI is served by Vite in dev, not from here.
FROM debian:13
# adduser is needed by both postinst scripts; systemctl is not present in a
# container, so a no-op shim lets the packages configure cleanly. The services
# are started by the entrypoint instead.
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl adduser \
    && rm -rf /var/lib/apt/lists/* \
    && printf '#!/bin/sh\nexit 0\n' > /usr/bin/systemctl && chmod +x /usr/bin/systemctl
COPY debs/ /tmp/debs/
RUN apt-get update && apt-get install -y --no-install-recommends /tmp/debs/*.deb \
    && rm -rf /var/lib/apt/lists/* /tmp/debs
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
