You've already forked pypi-proxy
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cc04f0e9aa | |||
| 42ef0f96f6 |
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -11,17 +11,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.22'
|
|
||||||
- name: Install gitea provider for Go Semantic Release
|
|
||||||
run: |
|
|
||||||
mkdir -p .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/ && \
|
|
||||||
wget https://github.com/cybercinch/go-semantic-release-provider-gitea/releases/download/v${GITEA_PROVIDER_VER}/go-semantic-release-provider-gitea_v${GITEA_PROVIDER_VER}_linux_amd64 \
|
|
||||||
-O .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea && \
|
|
||||||
chmod a+x .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea
|
|
||||||
env:
|
|
||||||
GITEA_PROVIDER_VER: 1.0.11
|
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ VOLUME [ "/var/lib/nginx/pypi" ]
|
|||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
ENV TZ=Pacific/Auckland
|
ENV TZ=Pacific/Auckland
|
||||||
|
# Transport scheme default is https
|
||||||
|
ENV TRANSPORT_SCHEME=https
|
||||||
|
|
||||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ http {
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
# Replace any reference to actual pypi w/ caching proxy
|
# Replace any reference to actual pypi w/ caching proxy
|
||||||
sub_filter 'https://pypi.org' $scheme://$host;
|
sub_filter 'https://pypi.org' %%TRANSPORT_SCHEME%%://$host;
|
||||||
sub_filter 'https://files.pythonhosted.org' $scheme://%%PYPI_FILES_HOSTNAME%%;
|
sub_filter 'https://files.pythonhosted.org' %%TRANSPORT_SCHEME%%://%%PYPI_FILES_HOSTNAME%%;
|
||||||
sub_filter_once off;
|
sub_filter_once off;
|
||||||
sub_filter_types '*';
|
sub_filter_types '*';
|
||||||
proxy_pass https://pypi;
|
proxy_pass https://pypi;
|
||||||
@@ -90,8 +90,8 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /simple {
|
location ^~ /simple {
|
||||||
sub_filter 'https://pypi.org' $scheme://$host;
|
sub_filter 'https://pypi.org' %%TRANSPORT_SCHEME%%://$host;
|
||||||
sub_filter 'https://files.pythonhosted.org' $scheme://%%PYPI_FILES_HOSTNAME%%;
|
sub_filter 'https://files.pythonhosted.org' %%TRANSPORT_SCHEME%%://%%PYPI_FILES_HOSTNAME%%;
|
||||||
sub_filter_types '*';
|
sub_filter_types '*';
|
||||||
sub_filter_once off;
|
sub_filter_once off;
|
||||||
# Make sure URI ends with /
|
# Make sure URI ends with /
|
||||||
@@ -128,7 +128,7 @@ http {
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
# Replace any reference to actual pypi w/ caching proxy
|
# Replace any reference to actual pypi w/ caching proxy
|
||||||
sub_filter 'https://files.pythonhosted.org' $scheme://%%PYPI_FILES_HOSTNAME%%;
|
sub_filter 'https://files.pythonhosted.org' %%TRANSPORT_SCHEME%%://%%PYPI_FILES_HOSTNAME%%;
|
||||||
sub_filter_once off;
|
sub_filter_once off;
|
||||||
sub_filter_types '*';
|
sub_filter_types '*';
|
||||||
proxy_pass https://pypi-files;
|
proxy_pass https://pypi-files;
|
||||||
|
|||||||
Reference in New Issue
Block a user