diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ea8bcc7c..bc2c1976 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,11 +5,20 @@ "workspaceFolder": "${localWorkspaceFolder}", "shutdownAction": "stopCompose", "portsAttributes": { - "41000": { + "1000": { "label": "Rollup", "onAutoForward": "silent" + }, + "hass:8123": { + "label": "Home Assistant", + "onAutoForward": "silent" + }, + "frigate:5000": { + "label": "Frigate", + "onAutoForward": "silent" } }, + "forwardPorts": [1000, "hass:8123", "frigate:5000"], "initializeCommand": ".devcontainer/initialize.sh", "postCreateCommand": "yarn install", "extensions": [ diff --git a/.devcontainer/frigate-hass-integration b/.devcontainer/frigate-hass-integration index dd90e2a4..16bd40d6 160000 --- a/.devcontainer/frigate-hass-integration +++ b/.devcontainer/frigate-hass-integration @@ -1 +1 @@ -Subproject commit dd90e2a412c46d42e076a4dc802435a077f07723 +Subproject commit 16bd40d6226150265edd3019f85a23e8e9e2ba01 diff --git a/.devcontainer/initialize.sh b/.devcontainer/initialize.sh index 0cddc959..c908909b 100755 --- a/.devcontainer/initialize.sh +++ b/.devcontainer/initialize.sh @@ -1,18 +1,7 @@ #!/bin/bash -set -euo pipefail - -readonly wanted_line_key="LOCAL_WORKSPACE_FOLDER" -readonly wanted_line="${wanted_line_key}='${PWD}'" -readonly file=".env" - -echo "Writing ${wanted_line} to ${file}" >&2 -if [[ -f "${file}" ]] && grep --quiet "^${wanted_line_key}=" "${file}"; then - sed --in-place "s,^${wanted_line_key}=.*,${wanted_line}," "${file}" -else - echo "${wanted_line}" >>"${file}" -fi - -set -x +set -euxo pipefail git submodule update --init + +.devcontainer/frigate-hass-integration/.devcontainer/set_dot_env.sh diff --git a/.devcontainer/preconfig/.storage/lovelace_resources b/.devcontainer/preconfig/.storage/lovelace_resources index f4b6b72e..1bd4c0f8 100644 --- a/.devcontainer/preconfig/.storage/lovelace_resources +++ b/.devcontainer/preconfig/.storage/lovelace_resources @@ -5,7 +5,7 @@ "data": { "items": [ { - "url": "http://localhost:41000/frigate-hass-card.js", + "url": "http://localhost:1000/frigate-hass-card.js", "type": "module", "id": "00c459541bac4290af01c51bf9c06ba1" } diff --git a/.vscode/launch.json b/.vscode/launch.json index 328688a9..0c322e3a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,10 +5,10 @@ "type": "pwa-chrome", "request": "launch", "name": "Launch Chrome against Home Assistant", - "url": "http://localhost:48123", + "url": "http://localhost:8123", "webRoot": "${workspaceFolder}/dist", "preLaunchTask": "Rollup", - "resolveSourceMapLocations": ["http://localhost:41000/**"] + "resolveSourceMapLocations": ["http://localhost:1000/**"] } ] } diff --git a/docker-compose.yml b/docker-compose.yml index 5a38fa8b..3940d253 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,6 @@ services: user: node init: true build: .devcontainer - ports: - # Rollup - - 41000:41000 env_file: - .env volumes: diff --git a/rollup.config.js b/rollup.config.js index 1bc213a0..5d8eced0 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -19,7 +19,7 @@ const dev = watch || process.env.DEV === 'true' || process.env.DEV === '1'; const serveopts = { contentBase: ['./dist'], host: '0.0.0.0', - port: 41000, + port: 1000, allowCrossOrigin: true, headers: { 'Access-Control-Allow-Origin': '*',