Files
connect4-moderator-server/.devcontainer/devcontainer.json
2025-12-27 16:30:09 -05:00

93 lines
3.6 KiB
JSON

{
"name": "Development environments on your infrastructure",
"image": "mcr.microsoft.com/devcontainers/rust:2-1-trixie",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "latest"
},
"ghcr.io/coder/devcontainer-features/code-server:1": {
"auth": "none",
"port": 13337
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": "false"
},
"./filebrowser": {
"folder": "${containerWorkspaceFolder}"
}
},
// SYS_PTRACE to enable go debugging
"runArgs": ["--cap-add=SYS_PTRACE"],
"customizations": {
"vscode": {
"extensions": [
"dustypomerleau.rust-syntax",
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"fill-labs.dependi"
]
},
"coder": {
"apps": [
{
"slug": "cursor",
"displayName": "Cursor Desktop",
"url": "cursor://coder.coder-remote/openDevContainer?owner=${localEnv:CODER_WORKSPACE_OWNER_NAME}&workspace=${localEnv:CODER_WORKSPACE_NAME}&agent=${localEnv:CODER_WORKSPACE_PARENT_AGENT_NAME}&url=${localEnv:CODER_URL}&token=$SESSION_TOKEN&devContainerName=${localEnv:CONTAINER_ID}&devContainerFolder=${containerWorkspaceFolder}&localWorkspaceFolder=${localWorkspaceFolder}",
"external": true,
"icon": "/icon/cursor.svg",
"order": 1
},
{
"slug": "rustrover",
"displayName": "RustRover",
"url": "jetbrains://gateway?type=ssh&product=RustRover&host=${localEnv:CODER_WORKSPACE_AGENT_NAME}.${localEnv:CODER_WORKSPACE_NAME}.${localEnv:CODER_WORKSPACE_OWNER_NAME}.coder&port=22&username=${localEnv:CODER_WORKSPACE_USERNAME:coder}&projectPath=${containerWorkspaceFolder}",
"external": true,
"icon": "https://resources.jetbrains.com/storage/products/rustrover/img/meta/rustrover_logo.svg",
"order": 2
},
{
"slug": "zed",
"displayName": "Zed Editor",
"url": "zed://ssh/${localEnv:CODER_WORKSPACE_AGENT_NAME}.${localEnv:CODER_WORKSPACE_NAME}.${localEnv:CODER_WORKSPACE_OWNER_NAME}.coder${containerWorkspaceFolder}",
"external": true,
"icon": "/icon/zed.svg",
"order": 5
},
// Reproduce `code-server` app here from the code-server
// feature so that we can set the correct folder and order.
// Currently, the order cannot be specified via option because
// we parse it as a number whereas variable interpolation
// results in a string. Additionally we set health check which
// is not yet set in the feature.
{
"slug": "code-server",
"displayName": "code-server",
"url": "http://${localEnv:FEATURE_CODE_SERVER_OPTION_HOST:127.0.0.1}:${localEnv:FEATURE_CODE_SERVER_OPTION_PORT:8080}/?folder=${containerWorkspaceFolder}",
"openIn": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPOPENIN:slim-window}",
"share": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPSHARE:owner}",
"icon": "/icon/code.svg",
"order": 3,
"healthCheck": {
"url": "http://${localEnv:FEATURE_CODE_SERVER_OPTION_HOST:127.0.0.1}:${localEnv:FEATURE_CODE_SERVER_OPTION_PORT:8080}/healthz",
"interval": 5,
"threshold": 2
}
}
]
}
},
"mounts": [
// Add a volume for the Coder home directory to persist shell history,
// and speed up dotfiles init and/or personalization.
"source=coder-coder-devcontainer-home,target=/home/coder,type=volume",
// Mount the entire home because conditional mounts are not supported.
// See: https://github.com/devcontainers/spec/issues/132
"source=${localEnv:HOME},target=/mnt/home/coder,type=bind,readonly"
],
"postCreateCommand": ["./.devcontainer/scripts/post_create.sh"],
"postStartCommand": ["./.devcontainer/scripts/post_start.sh"]
}