From 12f728189cc3277184a36621e8bccb23fe3d64ff Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 22:44:04 +0300 Subject: [PATCH] ci: add wildcard support to fly.io wsproxies (#11188) * ci: add wildcard support to fly.io wsproxies * Update sao-paulo-coder.toml * Update sydney-coder.toml * Update paris-coder.toml * Apply suggestions from code review Co-authored-by: Dean Sheather * Update .github/fly-wsproxies/sao-paulo-coder.toml Co-authored-by: Dean Sheather * Update sao-paulo-coder.toml * Update sydney-coder.toml --------- Co-authored-by: Dean Sheather --- .github/fly-wsproxies/paris-coder.toml | 7 ++++--- .github/fly-wsproxies/sao-paulo-coder.toml | 9 +++++---- .github/fly-wsproxies/sydney-coder.toml | 7 ++++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/fly-wsproxies/paris-coder.toml b/.github/fly-wsproxies/paris-coder.toml index 53ff4ab6b1..0bd539c92a 100644 --- a/.github/fly-wsproxies/paris-coder.toml +++ b/.github/fly-wsproxies/paris-coder.toml @@ -2,16 +2,17 @@ app = "paris-coder" primary_region = "cdg" [experimental] - entrypoint = ["/opt/coder", "wsproxy", "server"] + entrypoint = ["/bin/sh", "-c", "CODER_DERP_SERVER_RELAY_URL=\"http://${FLY_PRIVATE_IP}:3000\" /opt/coder wsproxy server"] auto_rollback = true [build] image = "ghcr.io/coder/coder-preview:main" [env] - CODER_ACCESS_URL = "https://paris-coder.fly.dev" + CODER_ACCESS_URL = "https://paris.fly.dev.coder.com" CODER_HTTP_ADDRESS = "0.0.0.0:3000" CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com" + CODER_WILDCARD_ACCESS_URL = "https://*--apps.paris.fly.dev.coder.com" [http_service] internal_port = 3000 @@ -21,6 +22,6 @@ primary_region = "cdg" min_machines_running = 0 [[vm]] - cpu_kind = "shared" + cpu_kind = "performance" cpus = 1 memory_mb = 512 diff --git a/.github/fly-wsproxies/sao-paulo-coder.toml b/.github/fly-wsproxies/sao-paulo-coder.toml index 0a93c9790c..0fe80310d3 100644 --- a/.github/fly-wsproxies/sao-paulo-coder.toml +++ b/.github/fly-wsproxies/sao-paulo-coder.toml @@ -2,17 +2,18 @@ app = "sao-paulo-coder" primary_region = "gru" [experimental] - entrypoint = ["/opt/coder", "wsproxy", "server"] + entrypoint = ["/bin/sh", "-c", "CODER_DERP_SERVER_RELAY_URL=\"http://${FLY_PRIVATE_IP}:3000\" /opt/coder wsproxy server"] auto_rollback = true [build] image = "ghcr.io/coder/coder-preview:main" [env] - CODER_ACCESS_URL = "https://sao-paulo-coder.fly.dev" + CODER_ACCESS_URL = "https://sao-paulo.fly.dev.coder.com" CODER_HTTP_ADDRESS = "0.0.0.0:3000" CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com" - + CODER_WILDCARD_ACCESS_URL = "https://*--apps.sao-paulo.fly.dev.coder.com" + [http_service] internal_port = 3000 force_https = true @@ -21,6 +22,6 @@ primary_region = "gru" min_machines_running = 0 [[vm]] - cpu_kind = "shared" + cpu_kind = "performance" cpus = 1 memory_mb = 512 diff --git a/.github/fly-wsproxies/sydney-coder.toml b/.github/fly-wsproxies/sydney-coder.toml index 24436958b2..6126695b72 100644 --- a/.github/fly-wsproxies/sydney-coder.toml +++ b/.github/fly-wsproxies/sydney-coder.toml @@ -2,16 +2,17 @@ app = "sydney-coder" primary_region = "syd" [experimental] - entrypoint = ["/opt/coder", "wsproxy", "server"] + entrypoint = ["/bin/sh", "-c", "CODER_DERP_SERVER_RELAY_URL=\"http://${FLY_PRIVATE_IP}:3000\" /opt/coder wsproxy server"] auto_rollback = true [build] image = "ghcr.io/coder/coder-preview:main" [env] - CODER_ACCESS_URL = "https://sydney-coder.fly.dev" + CODER_ACCESS_URL = "https://sydney.fly.dev.coder.com" CODER_HTTP_ADDRESS = "0.0.0.0:3000" CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com" + CODER_WILDCARD_ACCESS_URL = "https://*--apps.sydney.fly.dev.coder.com" [http_service] internal_port = 3000 @@ -21,6 +22,6 @@ primary_region = "syd" min_machines_running = 0 [[vm]] - cpu_kind = "shared" + cpu_kind = "performance" cpus = 1 memory_mb = 512