-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df1d3ad
commit d423462
Showing
18 changed files
with
844 additions
and
820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
# Use an official Python image as the base image | ||
FROM python:3.12-slim | ||
|
||
# Set environment variables | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
curl \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
libjpeg-dev \ | ||
zlib1g-dev \ | ||
gcc \ | ||
make \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the timezone to Europe/Vilnius | ||
ENV TZ=Europe/Vilnius | ||
|
||
# Set up the user for vscode | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME | ||
|
||
# Switch to the vscode user | ||
USER $USERNAME | ||
|
||
# Set the working directory | ||
WORKDIR /home/vscode | ||
|
||
# Expose the default Home Assistant port | ||
EXPOSE 8123 | ||
# Use an official Python image as the base image | ||
FROM python:3.12-slim | ||
|
||
# Set environment variables | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
curl \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
libjpeg-dev \ | ||
zlib1g-dev \ | ||
gcc \ | ||
make \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the timezone to Europe/Vilnius | ||
ENV TZ=Europe/Vilnius | ||
|
||
# Set up the user for vscode | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME | ||
|
||
# Switch to the vscode user | ||
USER $USERNAME | ||
|
||
# Set the working directory | ||
WORKDIR /home/vscode | ||
|
||
# Expose the default Home Assistant port | ||
EXPOSE 8123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,44 @@ | ||
{ | ||
"name": "Home Assistant Dev Container", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": ".." | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.pythonPath": "/usr/local/bin/python", | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-toolsai.jupyter", | ||
"ms-python.black-formatter", | ||
"ms-python.autopep8", | ||
"ms-python.pylint", | ||
"ms-vscode.remote-containers", | ||
"charliermarsh.ruff" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "pip install -r requirements.txt", | ||
"remoteUser": "vscode", | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/config,target=/config,type=bind", | ||
"source=${localWorkspaceFolder}/custom_components,target=/config/custom_components,type=bind" | ||
], | ||
"forwardPorts": [ | ||
8123 | ||
], | ||
"remoteEnv": { | ||
"TZ": "Europe/Vilnius" | ||
} | ||
{ | ||
"name": "Home Assistant Dev Container", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": ".." | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.pythonPath": "/usr/local/bin/python", | ||
"python.selectInterpreter": "/usr/local/bin/python", | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-toolsai.jupyter", | ||
"ms-python.black-formatter", | ||
"ms-python.autopep8", | ||
"ms-python.pylint", | ||
"ms-vscode.remote-containers", | ||
"charliermarsh.ruff", | ||
"yzhang.markdown-all-in-one", | ||
"kevinrose.vsc-python-indent", | ||
"keesschollaart.vscode-home-assistant", | ||
"donjayamanne.githistory", | ||
"mhutchie.git-graph" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "pip install -r requirements.txt", | ||
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", | ||
"remoteUser": "vscode", | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/config,target=/config,type=bind", | ||
"source=${localWorkspaceFolder}/custom_components,target=/config/custom_components,type=bind" | ||
], | ||
"forwardPorts": [ | ||
8123 | ||
], | ||
"remoteEnv": { | ||
"TZ": "Europe/Vilnius" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: HACS validation | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
validate: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout | ||
uses: "actions/checkout@v4" | ||
- name: Hassfest | ||
uses: "home-assistant/actions/hassfest@master" | ||
- name: HACS validation | ||
uses: "hacs/action@main" | ||
with: | ||
name: HACS validation | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
validate: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout | ||
uses: "actions/checkout@v4" | ||
- name: Hassfest | ||
uses: "home-assistant/actions/hassfest@master" | ||
- name: HACS validation | ||
uses: "hacs/action@main" | ||
with: | ||
CATEGORY: integration |
Oops, something went wrong.