mirror of
https://github.com/pypiserver/pypiserver
synced 2025-02-22 19:19:37 +01:00

* Compose updates; doc updates; changelog for 1.3.0 * chore(ver): bump 1.2.7-->1.3.0 * update date in README * rst is not markdown * Add issue numbers to changelog
74 lines
3.1 KiB
YAML
74 lines
3.1 KiB
YAML
---
|
|
# ######################################################################
|
|
# pypiserver docker-compose examples
|
|
# ######################################################################
|
|
# The below examples illustrate different ways that pypiserver may be
|
|
# configured with docker-compose (and by extension, with Docker) to
|
|
# serve your python packages.
|
|
#
|
|
# Most of the configuration options detailed below can be mixed and
|
|
# matched as desired.
|
|
# ######################################################################
|
|
|
|
version: "3.3"
|
|
|
|
services:
|
|
|
|
# ##################################################################
|
|
# Default
|
|
# ##################################################################
|
|
# The default configuration serves packages from the /data/packages
|
|
# directory inside the container. This directory is mounted as a
|
|
# volume in the Dockerfile, so it will be persisted, as long as you
|
|
# do not remove it with `docker-compose down -v` or
|
|
# `docker volume rm`.
|
|
# ##################################################################
|
|
|
|
pypiserver-default:
|
|
image: pypiserver/pypiserver:latest
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
# ##################################################################
|
|
# Authenticated
|
|
# ##################################################################
|
|
# This config uses a locally created .htpasswd file to authenticate
|
|
# access to pypiserver. We assume our .htpasswd file is in a local
|
|
# directory `./auth`, which we mount to `/data/auth` in the
|
|
# container, and update the `command` from the Dockerfile to look
|
|
# for that file for authentication. Note that because we are
|
|
# overriding the default `command`, which tells pypiserver where to
|
|
# serve packages from, we need to include that part of the command
|
|
# in addition to our authentication information.
|
|
# ##################################################################
|
|
|
|
pypiserver-authenticated:
|
|
image: pypiserver/pypiserver:latest
|
|
volumes:
|
|
- type: bind
|
|
source: ./auth
|
|
target: /data/auth
|
|
command: -P /data/auth/.htpasswd -a update,download,list /data/packages
|
|
ports:
|
|
- "8081:8080"
|
|
|
|
# ##################################################################
|
|
# Serve local packages
|
|
# ##################################################################
|
|
# This config allows us to manage our package directory locally,
|
|
# rather than in a volume managed directly by docker. Note that
|
|
# especially if running from a Mac, this may cause performance
|
|
# degradations, which can be worked around by using the `consistency`
|
|
# setting if desired. Here, we mount a local `./packages` directory
|
|
# to `/data/packages`, overriding the standard volume.
|
|
# ##################################################################
|
|
|
|
pypiserver-local-packages:
|
|
image: pypiserver/pypiserver:latest
|
|
volumes:
|
|
- type: bind
|
|
source: ./packages
|
|
target: /data/packages
|
|
ports:
|
|
- "8082:8080"
|