more refinements
This commit is contained in:
28
.devcontainer/Dockerfile
Normal file
28
.devcontainer/Dockerfile
Normal 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
|
||||
33
.devcontainer/devcontainer.json
Normal file
33
.devcontainer/devcontainer.json
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user