mirror of
https://github.com/ublue-os/forge.git
synced 2025-04-08 07:53:43 +03:00
136 lines
5 KiB
JSON
136 lines
5 KiB
JSON
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
|
{
|
|
"name": "ublue-os/forge",
|
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
|
"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"
|
|
}
|
|
},
|
|
// Create symbolic link for forge data dir mount
|
|
"initializeCommand": "${localWorkspaceFolder}/.devcontainer/prepare_mount.sh",
|
|
// Container user definition - This is needed for compatibility with podman -> https://github.com/containers/podman/issues/15001#issuecomment-1193321924
|
|
"remoteUser": "vscode",
|
|
"containerUser": "vscode",
|
|
// Container environment variables
|
|
"containerEnv": {
|
|
// poetry settings
|
|
"POETRY_VIRTUALENVS_CREATE": "false",
|
|
// 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"
|
|
},
|
|
// Mount folder from host system
|
|
"mounts": [
|
|
// forge config data folder | used for testing only
|
|
"source=${localWorkspaceFolder}/.devcontainer/mountpoint,target=/data,type=bind,consistency=cached"
|
|
],
|
|
// Install and configure DEV tools
|
|
"postCreateCommand": "bash ./.devcontainer/install-dev-tools.sh",
|
|
// VSCode settings
|
|
"customizations": {
|
|
"vscode": {
|
|
"settings": {
|
|
// Terminal settings
|
|
"terminal.integrated.defaultProfile.linux": "zsh",
|
|
"terminal.integrated.profiles.linux": {
|
|
"bash": {
|
|
"path": "bash",
|
|
"icon": "terminal-bash"
|
|
},
|
|
"zsh": {
|
|
"path": "zsh"
|
|
}
|
|
},
|
|
// Editor settings
|
|
"editor.suggestSelection": "first",
|
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
"editor.formatOnSave": true,
|
|
"editor.formatOnPaste": true,
|
|
"files.associations": {
|
|
".ansible-lint": "yaml",
|
|
".gitmessage": "git-commit",
|
|
"**/playbooks/*.yml": "ansible",
|
|
"**/roles/**/tasks/*.yml": "ansible",
|
|
"**/inventory*.yml": "ansible",
|
|
"**/*.just": "just",
|
|
"**/.containerignore": "ignore"
|
|
},
|
|
// Python configuration
|
|
"[python]": {
|
|
"editor.defaultFormatter": "ms-python.black-formatter"
|
|
},
|
|
// Ansible configuration
|
|
"ansible.validation.enabled": true,
|
|
"ansible.validation.lint.arguments": "-c /workspaces/forge/anvil/ansible/.ansible-lint",
|
|
"ansible.python.interpreterPath": "/usr/local/python/current/bin/python",
|
|
"ansible.ansible.reuseTerminal": true,
|
|
"ansible.lightspeed.enabled": true,
|
|
"ansible.lightspeed.suggestions.enabled": true,
|
|
"ansible.lightspeed.URL": "https://c.ai.ansible.redhat.com",
|
|
// Template configuration
|
|
"templates.folder": "${localWorkspaceFolder}/.vscode/templates",
|
|
// Spell-Check configuration
|
|
"cSpell.customDictionaries": {
|
|
"project-words": {
|
|
"name": "custom-dictionary",
|
|
"path": "${workspaceFolder}/.vscode/cspell_custom.txt",
|
|
"description": "Words used in this project",
|
|
"addWords": true
|
|
},
|
|
"custom": true,
|
|
"internal-terms": false
|
|
},
|
|
// Workspace colors
|
|
"peacock.affectActivityBar": false,
|
|
"peacock.affectStatusBar": true,
|
|
"peacock.affectTitleBar": false,
|
|
"peacock.surpriseMeOnStartup": false
|
|
},
|
|
// VSCode Extensions installed in DevContainer
|
|
"extensions": [
|
|
"be5invis.toml",
|
|
"codezombiech.gitignore",
|
|
"davidanson.vscode-markdownlint",
|
|
"esbenp.prettier-vscode",
|
|
"gitlab.gitlab-workflow",
|
|
"gruntfuggly.todo-tree",
|
|
"johnpapa.vscode-peacock",
|
|
"ms-azuretools.vscode-docker",
|
|
"ms-python.autopep8",
|
|
"ms-python.black-formatter",
|
|
"ms-python.python",
|
|
"mutantdino.resourcemonitor",
|
|
"redhat.ansible",
|
|
"redhat.vscode-yaml",
|
|
"skellock.just",
|
|
"streetsidesoftware.code-spell-checker-german",
|
|
"streetsidesoftware.code-spell-checker",
|
|
"tamasfe.even-better-toml"
|
|
]
|
|
}
|
|
}
|
|
}
|