Skip to content

Commit

Permalink
some configuration work
Browse files Browse the repository at this point in the history
  • Loading branch information
LaggAt committed Nov 19, 2022
1 parent 6f7f6ad commit ccf020a
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 5 deletions.
16 changes: 13 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,26 @@
//publish ha on 9123 when started
"appPort": ["9123:8123"],
//install these vscode extensions
"extensions": [],
"extensions": [
// debug bash scripts
"rogalmic.bash-debug",
],
//use these devcontainer settings
"settings": {
//linux line breaks
"files.eol": "\n"
"files.eol": "\n",
//prefer ZSH shell
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh",
},
//how to run the container, network mode, privileged, volumes, ...
"runArgs": [
"--name",
"devcontainer_govee",
"devcontainer_jokes",
"--network",
"host",
"--privileged",
Expand Down
7 changes: 5 additions & 2 deletions .devcontainer/scripts/postCreate.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash

#activate all custom_components in /workspaces/...
/usr/local/bin/dev component activate --all

#TODO: run your scripts here
#TODO: start home assistant

/bin/echo Welcome to ha-devcontainer! Start coding!
#start home assistant in background
/usr/local/bin/dev ha start &
54 changes: 54 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Start: Home Assistant",
"type": "bashdb",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "/usr/local/bin/dev",
"args": ["ha", "start"],
},
{
"name": "Chrome: Open Home Assistant UI",
"request": "launch",
"type": "chrome",
"url": "http://localhost:8123",
"webRoot": "${workspaceFolder}"
},
{
"name": "Python: Remote-Attach debugger",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
],
"justMyCode": true
},
{
"name": "Python: debug current file",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Bash: debug current file",
"type": "bashdb",
"request": "launch",
"program": "${file}",
"args": [],
},
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
//linux line breaks
"files.eol": "\n",
//prefer ZSH shell
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh",
}

0 comments on commit ccf020a

Please sign in to comment.