Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .devcontainer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# User-specific devcontainer directory with merged personal preferences
user/
46 changes: 46 additions & 0 deletions .devcontainer/devenv.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all the comments in this file necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is standard text that the devenv tool outputs

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Devenv project configuration
# Edit this file to configure your project's devcontainer
# and then run `devenv generate` to create the devcontainer.json files

name: "cdk"

# Modules: Built-in functionality
# - mise: Install and configure mise for dev tools management (https://mise.jdx.dev/)
# - docker-in-docker: Enable running Docker containers within the devcontainer
# - scala: Add IDE plugins and jar caching for Scala development
# - node: Add IDE plugins for Node.js development
# To disable, comment out or remove items from this list
modules:
- mise
# - docker-in-docker # (disabled by default)
# - scala # (disabled by default)
- node # (disabled by default)

# Optional: Container image to use (defaults to latest ubuntu LTS)
# image: "mcr.microsoft.com/devcontainers/base:ubuntu"

# Optional: Ports to forward
# forwardPorts:
# - 8080 # same port on host and container
# - "8000:9000" # hostPort:containerPort

# Optional: Mount directories from host to container
# mounts:
# - "source=${localEnv: HOME}/.gu/example,target=/home/vscode/.gu/example,readonly,type=bind,consistency=cached"

# Optional: IDE plugins - shared project plugins like language support
# plugins:
# vscode: []
# intellij: []

# Optional: Commands to run after container creation
# Each command has a 'cmd' field and a 'workingDirectory' field
# e.g.
# postCreateCommand:
# - cmd: "npm install"
# workingDirectory: "."
# - cmd: "make setup"
# workingDirectory: "/workspaces/project"
# postStartCommand:
# - cmd: "echo 'Container started successfully'"
# workingDirectory: "."
34 changes: 34 additions & 0 deletions .devcontainer/shared/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name" : "cdk",
"image" : "mcr.microsoft.com/devcontainers/base:ubuntu",
"customizations" : {
"vscode" : {
"extensions" : [
"hverlin.mise-vscode"
]
},
"jetbrains" : {
"plugins" : [
"com.github.l34130.mise",
"NodeJS"
]
}
},
"forwardPorts" : [
],
"mounts" : [
{
"source" : "devenv-mise-data-volume",
"target" : "/mnt/mise-data",
"type" : "volume"
}
],
"containerEnv" : {
"MISE_DATA_DIR" : "/mnt/mise-data",
"MISE_INSTALL_PATH" : "/mnt/mise-data/mise"
},
"remoteEnv" : {
"PATH" : "${containerEnv:PATH}:/mnt/mise-data/shims"
},
"postCreateCommand" : "((cd . && bash -c ' echo -e \"\\033[1;34m[setup] Setting up mise.\\033[0m\" && echo -e \"\\033[1;34m[setup] ensure correct ownership of the shared mise data volume\\033[0m\" && sudo chown -R vscode:vscode /mnt/mise-data && echo -e \"\\033[1;34m[setup] checking for mise already present\\033[0m\" && (test -f $MISE_INSTALL_PATH && echo -e \"\\033[1;34m[setup] mise is present\\033[0m\") || (echo -e \"\\033[1;34m[setup] Installing mise...\\033[0m\" && curl -fsSL https://mise.run/bash | sh) && echo -e \"\\033[1;34m[setup] Symlinking $MISE_INSTALL_PATH to /usr/local/bin/mise...\\033[0m\" && sudo ln -sf $MISE_INSTALL_PATH /usr/local/bin/mise && echo -e \"\\033[1;34m[setup] checking mise working correctly\\033[0m\" && mise --version && echo -e \"\\033[1;34m[setup] updating mise if needed\\033[0m\" && (mise self-update --yes || echo \"Skipping mise self-update - you may be offline\") && echo -e \"\\033[1;34m[setup] trusting (See: https://mise.jdx.dev/cli/trust.html)\\033[0m\" && (mise trust --yes || true) && (mise install || echo -e \"\\033[1;33m[setup] mise install failed. You may need to run mise install manually inside the container.\\033[0m\") && echo -e \"\\033[1;34m[setup] final checks\\033[0m\" && export PATH=\"/mnt/mise-data/shims:$PATH\" && mise doctor && echo -e \"\\033[1;32m[setup] mise setup complete at $MISE_INSTALL_PATH.\\033[0m\" ')) | sudo tee /var/log/post-create.log"
}