more refinements

This commit is contained in:
Mats Tornberg
2025-11-22 15:57:36 +00:00
parent 00f236cac7
commit 790b174a9e
8 changed files with 270 additions and 22 deletions

28
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM golang:1.25.4-bookworm
# Install dependencies for telldus-core
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libssl-dev \
libavahi-client-dev \
libglib2.0-dev \
libftdi-dev \
libconfuse-dev \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Build telldus-core
COPY ./telldus-core /usr/src/telldus-core
WORKDIR /usr/src/telldus-core
RUN cmake . \
&& make \
&& make install \
&& ldconfig
# Set workdir for the project
WORKDIR /workspaces/go-telldus-matter
ENV GO111MODULE=on
ENV CGO_ENABLED=1

View File

@@ -0,0 +1,33 @@
{
"name": "Go Telldus Matter Dev",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"workspaceFolder": "/workspaces/go-telldus-matter",
"runArgs": [
"--privileged"
],
"mounts": [
"source=/dev/bus/usb,target=/dev/bus/usb,type=bind",
"source=${localWorkspaceFolder}/tellstick.conf,target=/etc/tellstick.conf,type=bind"
],
"containerEnv": {
"MQTT_URL": "10.10.3.12:1883",
"MQTT_USER": "telldus-dev",
"MQTT_PASSWORD": ""
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.Go",
"ms-vscode.vscode-typescript-next"
],
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true
}
}
},
"postCreateCommand": "go mod download && cd frontend && npm install"
}