Skip to content

Commit

Permalink
Add support for authenticate switch
Browse files Browse the repository at this point in the history
  • Loading branch information
mark86092 committed Sep 19, 2017
1 parent 6cd8980 commit 8c36dc9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
PYPI_ROOT="${PYPI_ROOT:-/srv/pypi}"
PYPI_PORT=${PYPI_PORT:-80}
PYPI_PASSWD_FILE="${PYPI_PASSWD_FILE:-${PYPI_ROOT}/.htpasswd}"
PYPI_AUTHENTICATE="${PYPI_AUTHENTICATE:-update}"

# make sure the passwd file exists
touch "${PYPI_PASSWD_FILE}"
Expand All @@ -14,4 +15,9 @@ if [[ "${PYPI_OVERWRITE}" != "" ]]; then
_extra="${_extra} --overwrite"
fi

/usr/bin/pypi-server --port ${PYPI_PORT} --passwords "${PYPI_PASSWD_FILE}" ${_extra} "${PYPI_ROOT}"
exec /usr/bin/pypi-server \
--port ${PYPI_PORT} \
--passwords "${PYPI_PASSWD_FILE}" \
--authenticate "${PYPI_AUTHENTICATE}" \
${_extra} \
"${PYPI_ROOT}"

0 comments on commit 8c36dc9

Please sign in to comment.