chore: Add examples on how to deploy private registries (#2719)

* chore: Add examples on how to deploy private registries

* chore: example for private pypiserver with https

* Allow DENO_CERT certificate with native workers

* Add BUN_TLS_REJECT_UNAUTHORIZED
This commit is contained in:
Guillaume Bouvignies
2023-11-29 11:38:23 +01:00
committed by GitHub
parent 419becea3f
commit 2081e7a8ff
24 changed files with 296 additions and 129 deletions

View File

@@ -30,6 +30,7 @@ lazy_static::lazy_static! {
static ref PIP_INDEX_URL: Option<String> = std::env::var("PIP_INDEX_URL").ok();
static ref PIP_TRUSTED_HOST: Option<String> = std::env::var("PIP_TRUSTED_HOST").ok();
static ref PIP_INDEX_CERT: Option<String> = std::env::var("PIP_INDEX_CERT").ok();
static ref RELATIVE_IMPORT_REGEX: Regex = Regex::new(r#"(import|from)\s(((u|f)\.)|\.)"#).unwrap();
@@ -121,6 +122,9 @@ pub async fn pip_compile(
if let Some(host) = PIP_TRUSTED_HOST.as_ref() {
args.extend(["--trusted-host", host]);
}
if let Some(host) = PIP_INDEX_CERT.as_ref() {
args.extend(["--cert", host]);
}
let mut child_cmd = Command::new("pip-compile");
child_cmd