Skip to content

Commit 3e6e1e6

Browse files
ci: add jnb wsproxy + update dogfood template (#12440)
Co-authored-by: Dean Sheather <dean@deansheather.com>
1 parent 662be56 commit 3e6e1e6

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.github/fly-wsproxies/jnb-coder.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
app = "jnb-coder"
2+
primary_region = "jnb"
3+
4+
[experimental]
5+
entrypoint = ["/bin/sh", "-c", "CODER_DERP_SERVER_RELAY_URL=\"http://[${FLY_PRIVATE_IP}]:3000\" /opt/coder wsproxy server"]
6+
auto_rollback = true
7+
8+
[build]
9+
image = "ghcr.io/coder/coder-preview:main"
10+
11+
[env]
12+
CODER_ACCESS_URL = "https://jnb.fly.dev.coder.com"
13+
CODER_HTTP_ADDRESS = "0.0.0.0:3000"
14+
CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com"
15+
CODER_WILDCARD_ACCESS_URL = "*--apps.jnb.fly.dev.coder.com"
16+
CODER_VERBOSE = "true"
17+
18+
[http_service]
19+
internal_port = 3000
20+
force_https = true
21+
auto_stop_machines = true
22+
auto_start_machines = true
23+
min_machines_running = 0
24+
25+
# Ref: https://fly.io/docs/reference/configuration/#http_service-concurrency
26+
[http_service.concurrency]
27+
type = "requests"
28+
soft_limit = 50
29+
hard_limit = 100
30+
31+
[[vm]]
32+
cpu_kind = "shared"
33+
cpus = 2
34+
memory_mb = 512

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,12 +856,14 @@ jobs:
856856
flyctl deploy --image "$IMAGE" --app paris-coder --config ./.github/fly-wsproxies/paris-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_PARIS" --yes
857857
flyctl deploy --image "$IMAGE" --app sydney-coder --config ./.github/fly-wsproxies/sydney-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_SYDNEY" --yes
858858
flyctl deploy --image "$IMAGE" --app sao-paulo-coder --config ./.github/fly-wsproxies/sao-paulo-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_SAO_PAULO" --yes
859+
flyctl deploy --image "$IMAGE" --app jnb-coder --config ./.github/fly-wsproxies/jnb-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_JNB" --yes
859860
env:
860861
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
861862
IMAGE: ${{ needs.build.outputs.IMAGE }}
862863
TOKEN_PARIS: ${{ secrets.FLY_PARIS_CODER_PROXY_SESSION_TOKEN }}
863864
TOKEN_SYDNEY: ${{ secrets.FLY_SYDNEY_CODER_PROXY_SESSION_TOKEN }}
864865
TOKEN_SAO_PAULO: ${{ secrets.FLY_SAO_PAULO_CODER_PROXY_SESSION_TOKEN }}
866+
TOKEN_JNB: ${{ secrets.FLY_JNB_CODER_PROXY_SESSION_TOKEN }}
865867

866868
# sqlc-vet runs a postgres docker container, runs Coder migrations, and then
867869
# runs sqlc-vet to ensure all queries are valid. This catches any mistakes

dogfood/main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ locals {
1919
"eu-helsinki" = "tcp://reinhard-hel-cdr-dev.tailscale.svc.cluster.local:2375"
2020
"ap-sydney" = "tcp://hildegard-sydney-cdr-dev.tailscale.svc.cluster.local:2375"
2121
"sa-saopaulo" = "tcp://oberstein-sao-cdr-dev.tailscale.svc.cluster.local:2375"
22+
"za-jnb" = "tcp://siegfried-jnb-cdr-dev.tailscale.svc.cluster.local:2375"
2223
}
2324

2425
repo_base_dir = data.coder_parameter.repo_base_dir.value == "~" ? "/home/coder" : replace(data.coder_parameter.repo_base_dir.value, "/^~\\//", "/home/coder/")
@@ -76,6 +77,11 @@ data "coder_parameter" "region" {
7677
name = "São Paulo"
7778
value = "sa-saopaulo"
7879
}
80+
option {
81+
icon = "/emojis/1f1ff-1f1e6.png"
82+
name = "Johannesburg"
83+
value = "za-jnb"
84+
}
7985
}
8086

8187
provider "docker" {

0 commit comments

Comments
 (0)