Skip to content

Commit aa7eeaa

Browse files
committed
ability to use the HA addon devcontainer for dev
1 parent 53c40fe commit aa7eeaa

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.devcontainer/devcontainer.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "Emoncms addon devcontainer",
3+
"image": "ghcr.io/home-assistant/devcontainer:addons",
4+
"appPort": ["7123:8123", "7357:4357"],
5+
"postStartCommand": "bash devcontainer_bootstrap",
6+
"runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"],
7+
"containerEnv": {
8+
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"extensions": ["timonwong.shellcheck", "esbenp.prettier-vscode"],
13+
"settings": {
14+
"terminal.integrated.profiles.linux": {
15+
"zsh": {
16+
"path": "/usr/bin/zsh"
17+
}
18+
},
19+
"terminal.integrated.defaultProfile.linux": "zsh",
20+
"editor.formatOnPaste": false,
21+
"editor.formatOnSave": true,
22+
"editor.formatOnType": true,
23+
"files.trimTrailingWhitespace": true
24+
}
25+
}
26+
},
27+
"mounts": [ "type=volume,target=/var/lib/docker" ]
28+
}

.vscode/tasks.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Start Home Assistant",
6+
"type": "shell",
7+
"command": "supervisor_run",
8+
"group": {
9+
"kind": "test",
10+
"isDefault": true
11+
},
12+
"presentation": {
13+
"reveal": "always",
14+
"panel": "new"
15+
},
16+
"problemMatcher": []
17+
}
18+
]
19+
}

0 commit comments

Comments
 (0)