From 5f7a26a6d1a7712c80c7000765e1b5f59d0e7dc2 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:02:37 +0300 Subject: [PATCH 1/8] ci: add wildcard support to fly.io wsproxies --- .github/fly-wsproxies/paris-coder.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/fly-wsproxies/paris-coder.toml b/.github/fly-wsproxies/paris-coder.toml index 53ff4ab6b16f1..967ad86644a24 100644 --- a/.github/fly-wsproxies/paris-coder.toml +++ b/.github/fly-wsproxies/paris-coder.toml @@ -2,25 +2,26 @@ app = "paris-coder" primary_region = "cdg" [experimental] - entrypoint = ["/opt/coder", "wsproxy", "server"] + entrypoint = ["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 force_https = true auto_stop_machines = true auto_start_machines = true - min_machines_running = 0 + min_machines_running = 2 [[vm]] - cpu_kind = "shared" + cpu_kind = "performance" cpus = 1 memory_mb = 512 From b5c6db1b7e2741395ff5ddcba53a335490271034 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:03:48 +0300 Subject: [PATCH 2/8] Update sao-paulo-coder.toml --- .github/fly-wsproxies/sao-paulo-coder.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/fly-wsproxies/sao-paulo-coder.toml b/.github/fly-wsproxies/sao-paulo-coder.toml index 0a93c9790c8e7..ba9fa5491fb89 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 = ["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,7 @@ primary_region = "gru" min_machines_running = 0 [[vm]] - cpu_kind = "shared" + cpu_kind = "performance" cpus = 1 memory_mb = 512 + From 62adf7544347e6c875a82cf8801127674205007b Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:04:42 +0300 Subject: [PATCH 3/8] Update sydney-coder.toml --- .github/fly-wsproxies/sydney-coder.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/fly-wsproxies/sydney-coder.toml b/.github/fly-wsproxies/sydney-coder.toml index 24436958b2ad5..2d12b14a6acf4 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 = ["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 From 1c7ad19a1bf803b648fb0af66e89b5bfbd2b354e Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:07:13 +0300 Subject: [PATCH 4/8] Update paris-coder.toml --- .github/fly-wsproxies/paris-coder.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/fly-wsproxies/paris-coder.toml b/.github/fly-wsproxies/paris-coder.toml index 967ad86644a24..790afc6eda001 100644 --- a/.github/fly-wsproxies/paris-coder.toml +++ b/.github/fly-wsproxies/paris-coder.toml @@ -19,7 +19,7 @@ primary_region = "cdg" force_https = true auto_stop_machines = true auto_start_machines = true - min_machines_running = 2 + min_machines_running = 0 [[vm]] cpu_kind = "performance" From 8562865f7b2b2acf37847bf5ca54ff7f5b395004 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:22:51 +0300 Subject: [PATCH 5/8] Apply suggestions from code review Co-authored-by: Dean Sheather --- .github/fly-wsproxies/paris-coder.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/fly-wsproxies/paris-coder.toml b/.github/fly-wsproxies/paris-coder.toml index 790afc6eda001..0bd539c92a77d 100644 --- a/.github/fly-wsproxies/paris-coder.toml +++ b/.github/fly-wsproxies/paris-coder.toml @@ -2,7 +2,7 @@ app = "paris-coder" primary_region = "cdg" [experimental] - entrypoint = ["CODER_DERP_SERVER_RELAY_URL=\"http://${FLY_PRIVATE_IP}:3000\"", "/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] From 40fd82b9d367677e0e253fff0aae41637714262a Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:23:09 +0300 Subject: [PATCH 6/8] Update .github/fly-wsproxies/sao-paulo-coder.toml Co-authored-by: Dean Sheather --- .github/fly-wsproxies/sao-paulo-coder.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/fly-wsproxies/sao-paulo-coder.toml b/.github/fly-wsproxies/sao-paulo-coder.toml index ba9fa5491fb89..14708ebf2bd97 100644 --- a/.github/fly-wsproxies/sao-paulo-coder.toml +++ b/.github/fly-wsproxies/sao-paulo-coder.toml @@ -25,4 +25,3 @@ primary_region = "gru" cpu_kind = "performance" cpus = 1 memory_mb = 512 - From 5826701d304e504e77c4e4c845af213c20d82973 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:23:36 +0300 Subject: [PATCH 7/8] Update sao-paulo-coder.toml --- .github/fly-wsproxies/sao-paulo-coder.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/fly-wsproxies/sao-paulo-coder.toml b/.github/fly-wsproxies/sao-paulo-coder.toml index 14708ebf2bd97..0fe80310d32e5 100644 --- a/.github/fly-wsproxies/sao-paulo-coder.toml +++ b/.github/fly-wsproxies/sao-paulo-coder.toml @@ -2,7 +2,7 @@ app = "sao-paulo-coder" primary_region = "gru" [experimental] - entrypoint = ["CODER_DERP_SERVER_RELAY_URL=\"http://${FLY_PRIVATE_IP}:3000\"", "/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] From 7db34acc0a993226cabefd06f4e7e578ced4c835 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 13 Dec 2023 17:23:59 +0300 Subject: [PATCH 8/8] Update sydney-coder.toml --- .github/fly-wsproxies/sydney-coder.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/fly-wsproxies/sydney-coder.toml b/.github/fly-wsproxies/sydney-coder.toml index 2d12b14a6acf4..6126695b72e22 100644 --- a/.github/fly-wsproxies/sydney-coder.toml +++ b/.github/fly-wsproxies/sydney-coder.toml @@ -2,7 +2,7 @@ app = "sydney-coder" primary_region = "syd" [experimental] - entrypoint = ["CODER_DERP_SERVER_RELAY_URL=\"http://${FLY_PRIVATE_IP}:3000\"", "/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]