version: '3.7'

services:
    pypiserver-authenticated:
        image: pypiserver/pypiserver:latest
        volumes:
            # Authentication file.
            - type: bind
              source: /home/jobs/scripts/by-user/root/docker/pypiserver/auth
              target: /data/auth

            # Python files.
            - type: bind
              source: /data/pypiserver/packages
              target: /data/packages
        ports:
            - "127.0.0.1:4000:8080"

        # I have purposefully removed the
        #    --fallback-url https://pypi.org/simple/
        # option to have a fully isolated environment.
        command: --disable-fallback --passwords /data/auth/.htpasswd --authenticate update /data/packages
