You've already forked pypi-proxy
Initial Project
This commit is contained in:
44
README.md
Normal file
44
README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# PYPI Proxy
|
||||
|
||||
The contents of this repository will enable building of a proxy based on [NGINX](https://hub.docker.com/_/nginx).
|
||||
|
||||
## Why?
|
||||
|
||||
This allows NGINX to serve pypi on a custom URL you define for both searching and individual downloads. Once cached by NGINX this will substantially speed up installations. Example you are running CI/CD builds multilple times in a day pulling the same files.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this proxy see below Compose File for Docker Swarm.
|
||||
|
||||
# docker-compose.yml
|
||||
version: "3.7"
|
||||
|
||||
networks:
|
||||
traefik-net:
|
||||
external: true
|
||||
services:
|
||||
proxy:
|
||||
image: docker.io/guisea/pypi-proxy:latest
|
||||
environment:
|
||||
TZ: Pacific/Auckland
|
||||
PYPI_HOSTNAME: pypi.example.com
|
||||
PYPI_FILES_HOSTNAME: pypi-files.example.com
|
||||
NGINX_ENTRYPOINT_QUIET_LOGS: 1
|
||||
networks:
|
||||
- traefik-net
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints: ["node.role=worker"]
|
||||
labels:
|
||||
- >
|
||||
traefik.http.routers.pypi.rule=Host(`pypi.example.com`)
|
||||
|| Host(`pypi-files.example.com`)
|
||||
- traefik.http.routers.pypi.tls=true
|
||||
- traefik.http.services.pypi.loadbalancer.server.port=80
|
||||
- traefik.http.services.pypi.loadbalancer.server.scheme=http
|
||||
- traefik.http.routers.pypi.entrypoints=web,websecure
|
||||
- traefik.http.routers.pypi.tls.certresolver=le
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik-net
|
||||
Reference in New Issue
Block a user