# Conjurer share service: Apache publishing short-lived symlink shares, plus # the two periodic jobs that build the search index and revoke expired links. # # This is the piece that used to live only as hand-placed scripts + hand-edited # Apache config on the host. Everything it needs is now in the image; the state # it shares with the musician (the link dir and the index) comes in as volumes. # # Build from the repository root: # docker build -f docker/Dockerfile.share -t conjurer-share . FROM debian:bookworm-slim # apache2 serves the links; python3 runs the scanner/revoker (both stdlib-only, # so there is nothing to pip install). RUN apt-get update && apt-get install -y --no-install-recommends \ apache2 python3 \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Same scripts the bare-metal deployment uses - no forked copies. COPY conjurer_musician/scan_shares.py ./scan_shares.py COPY conjurer_musician/revoke_shares.py ./revoke_shares.py COPY docker/share-vhost.conf.tpl ./share-vhost.conf.tpl COPY docker/entrypoint.share.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh # /mnt/shares - media library (mount read-only; symlink targets) # /var/www/html/share - the symlinks themselves (SHARED with the musician, # which is what creates them) # /srv/share/db - share_scan.json (SHARED with the musician, which # searches it) # /var/log/apache2 - access log the revoker tails VOLUME ["/mnt/shares", "/var/www/html/share", "/srv/share/db", "/var/log/apache2"] EXPOSE 80 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]