mirror of
https://github.com/ciiiii/cloudflare-docker-proxy.git
synced 2025-12-06 14:42:51 +08:00
Fix staging configuration
This commit is contained in:
@@ -6,6 +6,7 @@ addEventListener("fetch", (event) => {
|
||||
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",
|
||||
@@ -13,6 +14,9 @@ const routes = {
|
||||
"k8s.libcuda.so": "https://registry.k8s.io",
|
||||
"ghcr.libcuda.so": "https://ghcr.io",
|
||||
"cloudsmith.libcuda.so": "https://docker.cloudsmith.io",
|
||||
|
||||
// staging
|
||||
"docker-staging.libcuda.so": dockerHub,
|
||||
};
|
||||
|
||||
function routeByHosts(host) {
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
name = "cloudflare-docker-proxy"
|
||||
workers_dev = true
|
||||
main = "src/index.js"
|
||||
compatibility_date = "2021-12-07"
|
||||
compatibility_date = "2023-12-01"
|
||||
|
||||
[dev]
|
||||
ip = "0.0.0.0"
|
||||
port = 8787
|
||||
local_protocol = "http"
|
||||
|
||||
[vars]
|
||||
MODE = "production"
|
||||
TARGET_UPSTREAM = ""
|
||||
[env.dev.vars]
|
||||
MODE = "debug"
|
||||
TARGET_UPSTREAM = "https://registry-1.docker.io"
|
||||
|
||||
[env.production]
|
||||
name = "cloudflare-docker-proxy"
|
||||
@@ -24,12 +22,14 @@ routes = [
|
||||
{ pattern = "cloudsmith.libcuda.so", 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 }
|
||||
|
||||
[env.staging.vars]
|
||||
|
||||
[env.dev.vars]
|
||||
MODE = "debug"
|
||||
TARGET_UPSTREAM = "https://registry-1.docker.io"
|
||||
MODE = "staging"
|
||||
TARGET_UPSTREAM = ""
|
||||
|
||||
Reference in New Issue
Block a user