Skip to content
Open

sync #112

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# cloudflare-docker-proxy

![deploy](https://github.com/ciiiii/cloudflare-docker-proxy/actions/workflows/deploy.yaml/badge.svg)
![deploy](https://github.com/dingtim/cloudflare-docker-proxy/actions/workflows/deploy.yaml/badge.svg)

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ciiiii/cloudflare-docker-proxy)
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/dingtim/cloudflare-docker-proxy)

> If you're looking for proxy for helm, maybe you can try [cloudflare-helm-proxy](https://github.com/ciiiii/cloudflare-helm-proxy).
> If you're looking for proxy for helm, maybe you can try [cloudflare-helm-proxy](https://github.com/dingtim/cloudflare-helm-proxy).

## Deploy

1. click the "Deploy With Workers" button
2. follow the instructions to fork and deploy
3. update routes as you requirement

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ciiiii/cloudflare-docker-proxy)
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/dingtim/cloudflare-docker-proxy)

## Routes configuration tutorial

Expand Down
18 changes: 9 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ const dockerHub = "https://registry-1.docker.io";

const routes = {
// production
"docker.libcuda.so": dockerHub,
"quay.libcuda.so": "https://quay.io",
"gcr.libcuda.so": "https://gcr.io",
"k8s-gcr.libcuda.so": "https://k8s.gcr.io",
"k8s.libcuda.so": "https://registry.k8s.io",
"ghcr.libcuda.so": "https://ghcr.io",
"cloudsmith.libcuda.so": "https://docker.cloudsmith.io",
"ecr.libcuda.so": "https://public.ecr.aws",
"newhub.supowers.com": dockerHub,
"quay.supowers.com": "https://quay.io",
"gcr.supowers.com": "https://gcr.io",
"k8s-gcr.supowers.com": "https://k8s.gcr.io",
"k8s.supowers.com": "https://registry.k8s.io",
"ghcr.supowers.com": "https://ghcr.io",
"cloudsmith.supowers.com": "https://docker.cloudsmith.io",
"ecr.supowers.com": "https://public.ecr.aws",

// staging
"docker-staging.libcuda.so": dockerHub,
"newhub-stage.supowers.com": dockerHub,
};

function routeByHosts(host) {
Expand Down
20 changes: 10 additions & 10 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ TARGET_UPSTREAM = "https://registry-1.docker.io"

[env.production]
name = "cloudflare-docker-proxy"
# routes = [
# { pattern = "docker.libcuda.so", custom_domain = true },
# { pattern = "quay.libcuda.so", custom_domain = true },
# { pattern = "gcr.libcuda.so", custom_domain = true },
# { pattern = "k8s-gcr.libcuda.so", custom_domain = true },
# { pattern = "k8s.libcuda.so", custom_domain = true },
# { pattern = "ghcr.libcuda.so", custom_domain = true },
# { pattern = "cloudsmith.libcuda.so", custom_domain = true },
# ]
routes = [
{ pattern = "newhub.supowers.com", custom_domain = true },
{ pattern = "quay.supowers.com", custom_domain = true },
{ pattern = "gcr.supowers.com", custom_domain = true },
{ pattern = "k8s-gcr.supowers.com", custom_domain = true },
{ pattern = "k8s.supowers.com", custom_domain = true },
{ pattern = "ghcr.supowers.com", custom_domain = true },
{ pattern = "cloudsmith.supowers.com", custom_domain = true },
]

[env.production.vars]
MODE = "production"
TARGET_UPSTREAM = ""

[env.staging]
name = "cloudflare-docker-proxy-staging"
# route = { pattern = "docker-staging.libcuda.so", custom_domain = true }
# route = { pattern = "newhub-staging.supowers.com", custom_domain = true }

[env.staging.vars]
MODE = "staging"
Expand Down