Skip to content
Merged
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
230 changes: 107 additions & 123 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,128 +3,112 @@
// SPDX-License-Identifier: AGPL-3.0-only

{
"name": "step",
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"forwardPorts": [
"minio-proxy:9002",
"minio:9001",
"minio:9000",
"keycloak:8090",
"keycloak-nginx:8443",
"hasura:8080",
"vault:8200",
"vault:8201",
"immudb:3322",
"immudb:3324",
"immudb:3325",
"rabbitmq:5672",
"rabbitmq:15672",
"b3:50051",
"simplesamlphp:8083"
],

// Fixes usage of LOCAL_WORKSPACE_FOLDER. See:
// https://github.com/microsoft/vscode-remote-release/issues/6844#issuecomment-1252288457
"initializeCommand": [
".devcontainer/scripts/initialize-command.sh"
],
// Use this environment variable if you need to bind mount your local source
// code into a new container
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
},

// Mount claude code config from developer folder (if existing) to ensure
// config and credentials work well
"mounts": [
"source=${localEnv:HOME}/.config/claude,target=/home/vscode/.config/claude,type=bind,consistency=cached"
],

"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

"userEnvProbe": "loginShell",
"updateRemoteUserUID": true,

"onCreateCommand": "direnv allow && devenv shell bash -- -c './.devcontainer/scripts/fix-vscode-settings-nix.sh'",
"updateContentCommand": "direnv allow && devenv shell bash -- -c './.devcontainer/scripts/fix-vscode-settings-nix.sh'",
"postCreateCommand": "direnv allow && devenv shell bash -- -c './.devcontainer/scripts/init-cli.sh'",

// Adding host requirements so that there is no need to manually select the
// machine to run on all the time
"hostRequirements": {
"storage": "40gb",
"cpus": 4
},

"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
"name": "step",
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"forwardPorts": [
"minio-proxy:9002",
"minio:9001",
"minio:9000",
"keycloak:8090",
"keycloak-nginx:8443",
"hasura:8080",
"vault:8200",
"vault:8201",
"immudb:3322",
"immudb:3324",
"immudb:3325",
"rabbitmq:5672",
"rabbitmq:15672",
"b3:50051",
"simplesamlphp:8083"
],
// Fixes usage of LOCAL_WORKSPACE_FOLDER. See:
// https://github.com/microsoft/vscode-remote-release/issues/6844#issuecomment-1252288457
"initializeCommand": [
".devcontainer/scripts/initialize-command.sh"
],
// Use this environment variable if you need to bind mount your local source
// code into a new container
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
},
// Mount claude code config from developer folder (if existing) to ensure
// config and credentials work well
"mounts": [
"source=${localEnv:HOME}/.config/claude,target=/home/vscode/.config/claude,type=bind,consistency=cached"
],
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"userEnvProbe": "loginShell",
"updateRemoteUserUID": true,
"onCreateCommand": "direnv allow && devenv shell bash -- -c './.devcontainer/scripts/fix-vscode-settings-nix.sh'",
"updateContentCommand": "direnv allow && devenv shell bash -- -c './.devcontainer/scripts/fix-vscode-settings-nix.sh'",
"postCreateCommand": "direnv allow && devenv shell bash -- -c './.devcontainer/scripts/init-cli.sh'",
// Adding host requirements so that there is no need to manually select the
// machine to run on all the time
"hostRequirements": {
"storage": "40gb",
"cpus": 4
},
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
},
"customizations": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AFAIK the only real change is this so why the reordering of the rest of things?

"codespaces": {
  "repositories": {
    // Allow checking out private submodules
    "sequentech/beyond": {
      "contents": "read"
    }
  }
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was json reformatting/prettifying. I believe we won't use this anymore, I can revert this change, if you like.

"vscode": {
"extensions": [
// run commands on save
// https://marketplace.visualstudio.com/items?itemName=fsevenm.run-it-on
"fsevenm.run-it-on",
// Docker for Visual Studio Code
"ms-azuretools.vscode-docker",
// select nix environment
"arrterian.nix-env-selector",
// Nix language support
"jnoortheen.nix-ide",
// Rust language support
"rust-lang.rust-analyzer",
// Markdown support and previsualization
"yzhang.markdown-all-in-one",
// Toml support
"tamasfe.even-better-toml",
// SQL formatter, useful for .sql files in hasura
"adpyke.vscode-sql-formatter",
// Debugging
"vadimcn.vscode-lldb",
// Allows to use Alt+Q (or Option+Q in mac) to rewrap lines
"stkb.rewrap",
// Mermaid support in markdown
"bierner.markdown-mermaid",
// For Keycloak SPIs
"vscjava.vscode-java-pack",
// To support multiple settings file and merge them, so that our
// fworkaround to support rust analyzer works fine
"swellaby.workspace-config-plus",
// Git blame support on hover of a line
"eamodio.gitlens",
// HTML preview
"george-alisson.html-preview-vscode",
// Python
"ms-python.python",
// Useful to check interactions with keyloak´s DB or other SQL databases
"cweijan.vscode-database-client2",
// Rewarp lines with Alt+Q or Cmd+Q
"stkb.rewrap",
Comment on lines +97 to +99
]
},
"codespaces": {
"repositories": {
// Allow checking out private submodules
"sequentech/beyond": {
"contents": "read"
}
},
"customizations": {
"vscode": {
"extensions": [
// run commands on save
// https://marketplace.visualstudio.com/items?itemName=fsevenm.run-it-on
"fsevenm.run-it-on",

// Docker for Visual Studio Code
"ms-azuretools.vscode-docker",

// select nix environment
"arrterian.nix-env-selector",

// Nix language support
"jnoortheen.nix-ide",

// Rust language support
"rust-lang.rust-analyzer",

// Markdown support and previsualization
"yzhang.markdown-all-in-one",

// Toml support
"tamasfe.even-better-toml",

// SQL formatter, useful for .sql files in hasura
"adpyke.vscode-sql-formatter",

// Debugging
"vadimcn.vscode-lldb",

// Allows to use Alt+Q (or Option+Q in mac) to rewrap lines
"stkb.rewrap",

// Mermaid support in markdown
"bierner.markdown-mermaid",

// For Keycloak SPIs
"vscjava.vscode-java-pack",

// To support multiple settings file and merge them, so that our
// fworkaround to support rust analyzer works fine
"swellaby.workspace-config-plus",

// Git blame support on hover of a line
"eamodio.gitlens",

// HTML preview
"george-alisson.html-preview-vscode",

// Python
"ms-python.python",

// Useful to check interactions with keyloak´s DB or other SQL databases
"cweijan.vscode-database-client2",

// Rewarp lines with Alt+Q or Cmd+Q
"stkb.rewrap",
]
},
"devpod": {
"prebuildRepository": "ghcr.io/sequentech/step"
}
}
}
},
"devpod": {
"prebuildRepository": "ghcr.io/sequentech/step"
}
}
}
7 changes: 7 additions & 0 deletions .devcontainer/scripts/init-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

set -ex -o pipefail

if git submodule update --init --recursive --depth 1; then
echo "Submodules are successfully loaded and available in the workspace"
else
echo "Failed to init submodules, they won't be available in the workspace"
fi


if ! grep OPENWHISK_API_HOST .devcontainer/.env &> /dev/null; then
cat <<EOF >> .devcontainer/.env
OPENWHISK_API_HOST="http://$(docker inspect openwhisk | jq -r '.[].Config.Hostname'):3233"
Expand Down
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2025 Sequent Tech Inc <legal@sequentech.io>
#
# SPDX-License-Identifier: AGPL-3.0-only
# Note: remember to configure Codespace access in "./.devcontainer/devcontainer.json" too
[submodule "beyond"]
path = beyond
url = ../beyond
branch = main
1 change: 1 addition & 0 deletions beyond
Submodule beyond added at 233834
Loading