2023-04-27 09:10:08 +03:00
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2024-04-27 00:29:40 +03:00
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
2023-04-27 09:10:08 +03:00
{
"name" : "ublue-os/forge" ,
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
2024-04-27 00:29:40 +03:00
"image" : "mcr.microsoft.com/devcontainers/base:bookworm" ,
"features" : {
"ghcr.io/devcontainers/features/python:1" : {
"installTools" : true ,
"version" : "3.11"
} ,
"ghcr.io/devcontainers-contrib/features/black:2" : {
"version" : "24.4.1"
} ,
"ghcr.io/devcontainers-contrib/features/poetry:2" : {
"version" : "1.8.2"
}
} ,
2024-05-10 17:03:05 +03:00
// Create symbolic link for forge data dir mount
"initializeCommand" : "${localWorkspaceFolder}/.devcontainer/prepare_mount.sh" ,
2024-04-27 00:29:40 +03:00
// Container user definition - This is needed for compatibility with podman -> https://github.com/containers/podman/issues/15001#issuecomment-1193321924
2023-04-27 09:10:08 +03:00
"remoteUser" : "vscode" ,
"containerUser" : "vscode" ,
2024-04-27 00:29:40 +03:00
// Container environment variables
2023-05-01 15:17:01 +03:00
"containerEnv" : {
2024-05-10 17:03:05 +03:00
// poetry settings
2023-05-01 15:17:01 +03:00
"POETRY_VIRTUALENVS_CREATE" : "false" ,
2024-05-10 17:03:05 +03:00
// lazygit settings
"LAZYGIT_VERSION" : "0.41.0" ,
// Nicegui settings
"NICEGUI_DIR" : "/workspaces/forge/anvil/nicegui" ,
// Ansible settings
"ANSIBLE_DIR" : "/workspaces/forge/anvil/ansible" ,
"ANSIBLE_INVENTORY" : "${ANSIBLE_DIR}/inventory.yml" ,
"ANSIBLE_CACHE_PLUGIN" : "community.general.yaml" ,
"ANSIBLE_CACHE_PLUGIN_CONNECTION" : "${ANSIBLE_DIR}/fact_cache" ,
"ANSIBLE_ROLES_PATH" : "${ANSIBLE_DIR}/roles" ,
"ANSIBLE_COLLECTIONS_PATH" : "${ANSIBLE_DIR}/collections" ,
"ANSIBLE_PRIVATE_KEY_FILE" : "/certs/ssh/ublue-os_forge-id_ed25519" ,
"ANSIBLE_DISPLAY_SKIPPED_HOSTS" : "False" ,
"ANSIBLE_STDOUT_CALLBACK" : "yaml" ,
"ANSIBLE_CALLBACKS_ENABLED" : "ansible.posix.profile_tasks" ,
"ANSIBLE_HOST_KEY_CHECKING:" : "False"
2023-05-01 15:17:01 +03:00
} ,
2024-05-10 17:03:05 +03:00
// Mount folder from host system
"mounts" : [
// forge config data folder | used for testing only
"source=${localWorkspaceFolder}/.devcontainer/mountpoint,target=/data,type=bind,consistency=cached"
] ,
2024-04-27 00:29:40 +03:00
// Install and configure DEV tools
2023-04-27 09:10:08 +03:00
"postCreateCommand" : "bash ./.devcontainer/install-dev-tools.sh" ,
2024-04-27 00:29:40 +03:00
// VSCode settings
2023-04-27 09:10:08 +03:00
"customizations" : {
"vscode" : {
"settings" : {
2024-04-27 00:29:40 +03:00
// Terminal settings
"terminal.integrated.defaultProfile.linux" : "zsh" ,
2023-04-27 09:10:08 +03:00
"terminal.integrated.profiles.linux" : {
2024-04-27 00:29:40 +03:00
"bash" : {
"path" : "bash" ,
"icon" : "terminal-bash"
} ,
2023-04-27 09:10:08 +03:00
"zsh" : {
2024-04-27 00:29:40 +03:00
"path" : "zsh"
2023-04-27 09:10:08 +03:00
}
} ,
2024-04-27 00:29:40 +03:00
// Editor settings
2023-04-27 09:10:08 +03:00
"editor.suggestSelection" : "first" ,
"editor.defaultFormatter" : "esbenp.prettier-vscode" ,
"editor.formatOnSave" : true ,
"editor.formatOnPaste" : true ,
2023-05-01 15:17:01 +03:00
"files.associations" : {
2024-04-27 00:29:40 +03:00
".ansible-lint" : "yaml" ,
".gitmessage" : "git-commit" ,
"**/playbooks/*.yml" : "ansible" ,
"**/roles/**/tasks/*.yml" : "ansible" ,
2024-05-03 17:20:11 +03:00
"**/inventory*.yml" : "ansible" ,
2024-05-10 17:03:05 +03:00
"**/*.just" : "just" ,
"**/.containerignore" : "ignore"
} ,
// Python configuration
"[python]" : {
"editor.defaultFormatter" : "ms-python.black-formatter"
2023-05-01 15:17:01 +03:00
} ,
2024-04-27 00:29:40 +03:00
// Ansible configuration
"ansible.validation.enabled" : true ,
2024-05-10 17:03:05 +03:00
"ansible.validation.lint.arguments" : "-c /workspaces/forge/anvil/ansible/.ansible-lint" ,
2024-05-01 19:24:38 +03:00
"ansible.python.interpreterPath" : "/usr/local/python/current/bin/python" ,
2024-04-27 00:29:40 +03:00
"ansible.ansible.reuseTerminal" : true ,
"ansible.lightspeed.enabled" : true ,
"ansible.lightspeed.suggestions.enabled" : true ,
"ansible.lightspeed.URL" : "https://c.ai.ansible.redhat.com" ,
// Template configuration
2024-05-10 17:03:05 +03:00
"templates.folder" : "${localWorkspaceFolder}/.vscode/templates" ,
2024-04-27 00:29:40 +03:00
// Spell-Check configuration
2023-04-27 09:10:08 +03:00
"cSpell.customDictionaries" : {
"project-words" : {
"name" : "custom-dictionary" ,
2024-05-10 17:03:05 +03:00
"path" : "${workspaceFolder}/.vscode/cspell_custom.txt" ,
2023-04-27 09:10:08 +03:00
"description" : "Words used in this project" ,
"addWords" : true
} ,
"custom" : true ,
"internal-terms" : false
} ,
2024-04-27 00:29:40 +03:00
// Workspace colors
2023-04-27 09:10:08 +03:00
"peacock.affectActivityBar" : false ,
"peacock.affectStatusBar" : true ,
"peacock.affectTitleBar" : false ,
"peacock.surpriseMeOnStartup" : false
} ,
2024-04-27 00:29:40 +03:00
// VSCode Extensions installed in DevContainer
2023-04-27 09:10:08 +03:00
"extensions" : [
2024-04-27 00:29:40 +03:00
"be5invis.toml" ,
"codezombiech.gitignore" ,
"davidanson.vscode-markdownlint" ,
2023-04-27 09:10:08 +03:00
"esbenp.prettier-vscode" ,
2024-04-27 00:29:40 +03:00
"gitlab.gitlab-workflow" ,
"gruntfuggly.todo-tree" ,
"johnpapa.vscode-peacock" ,
2023-04-27 09:10:08 +03:00
"ms-azuretools.vscode-docker" ,
2024-04-27 00:29:40 +03:00
"ms-python.autopep8" ,
"ms-python.black-formatter" ,
"ms-python.python" ,
"mutantdino.resourcemonitor" ,
2023-05-01 15:17:01 +03:00
"redhat.ansible" ,
2023-04-27 09:10:08 +03:00
"redhat.vscode-yaml" ,
2024-05-03 17:20:11 +03:00
"skellock.just" ,
2024-04-27 00:29:40 +03:00
"streetsidesoftware.code-spell-checker-german" ,
"streetsidesoftware.code-spell-checker" ,
"tamasfe.even-better-toml"
2023-04-27 09:10:08 +03:00
]
}
}
}