Aaron Guise 7675c2138e
All checks were successful
CI / release (push) Successful in 36s
fix: Transform the conf file 🐛
2025-02-17 10:43:01 +13:00
2025-02-17 09:57:19 +13:00
2025-02-17 10:43:01 +13:00
2024-06-08 12:00:18 +12:00
2024-06-08 12:00:18 +12:00
2024-06-09 23:19:56 +12:00
2024-06-09 23:05:33 +12:00

PYPI Proxy

The contents of this repository will enable building of a proxy based on 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
Description
Proxy Pypi through NGINX
Readme 40 KiB
v1.1.2 Latest
2025-02-17 10:43:31 +13:00
Languages
Shell 67.6%
Dockerfile 32.4%