Skip to content

Commit 2716ab8

Browse files
committed
fix(.devcontainer): fix code-server app URL, healthcheck and order, add home volume
1 parent 8eebb4f commit 2716ab8

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,33 @@
4343
"external": true,
4444
"icon": "/icon/zed.svg",
4545
"order": 5
46+
},
47+
// Reproduce `code-server` app here from the code-server
48+
// feature so that we can set the correct folder and order.
49+
// Currently, the order cannot be specified via option because
50+
// we parse it as a number whereas variable interpolation
51+
// results in a string. Additionally we set health check which
52+
// is not yet set in the feature.
53+
{
54+
"slug": "code-server",
55+
"displayName": "code-server",
56+
"url": "http://${localEnv:FEATURE_CODE_SERVER_OPTION_HOST:127.0.0.1}:${localEnv:FEATURE_CODE_SERVER_OPTION_PORT:8080}/?folder=${containerWorkspaceFolder}",
57+
"openIn": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPOPENIN:slim-window}",
58+
"share": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPSHARE:owner}",
59+
"icon": "/icon/code.svg",
60+
"group": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPGROUP:Web Editors}",
61+
"order": 3,
62+
"healthCheck": {
63+
"url": "http://${localEnv:FEATURE_CODE_SERVER_OPTION_HOST:127.0.0.1}:${localEnv:FEATURE_CODE_SERVER_OPTION_PORT:8080}/healthz",
64+
"interval": 5,
65+
"threshold": 2
66+
}
4667
}
4768
]
4869
}
4970
},
5071
"mounts": [
72+
"source=coder-coder-devcontainer-home,target=/home/coder",
5173
// Mount the entire home because conditional mounts are not supported.
5274
// See: https://github.com/devcontainers/spec/issues/132
5375
"source=${localEnv:HOME},target=/mnt/home/coder,type=bind,readonly"

.devcontainer/filebrowser/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"healthcheck": {
4242
"url": "http://localhost:${localEnv:FEATURE_FILEBROWSER_OPTION_PORT:13339}/health",
4343
"interval": 5,
44-
"threshold": 6
44+
"threshold": 2
4545
}
4646
}
4747
]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy