Skip to content

Commit

Permalink
Changed extraction location of container_content, adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
iprak committed Feb 17, 2024
1 parent 50f8b9c commit 578f516
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 218 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ RUN \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

#Copy .vscode, pylint, pyproject.toml, etc.
COPY container_content ./container_content

#Install default requirements
COPY requirements.txt ./
RUN pip3 install -r requirements.txt --use-deprecated=legacy-resolver
RUN rm -rf requirements.txt
RUN pip3 install -r requirements.txt --use-deprecated=legacy-resolver; rm -rf requirements.txt

COPY container_content /tmp/container_content
#Ensure setup.sh is executable
RUN chmod +x /container_content/scripts/setup.sh
13 changes: 0 additions & 13 deletions container_content/.gitattributes

This file was deleted.

134 changes: 0 additions & 134 deletions container_content/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions container_content/.vscode/launch.json

This file was deleted.

9 changes: 0 additions & 9 deletions container_content/.vscode/settings.json

This file was deleted.

37 changes: 0 additions & 37 deletions container_content/.vscode/tasks.json

This file was deleted.

27 changes: 27 additions & 0 deletions container_content/scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

# Stop on errors
set -e

echo "Moving additional container content"
[ -f "/container_content/pylint" ] && { rm -R ./pylint; }
mv -f /container_content/pylint .
mv -f /container_content/pyproject.toml .

echo "Preparing config folder"
mkdir -p /config

FILE=".devcontainer/configuration.yaml"
[ -f $FILE ] && { echo "Linking configuration.yaml"; ln -sfr $FILE /config/configuration.yaml; }
FILE=".devcontainer/secrets.yaml"
[ -f $FILE ] && { echo "Linking secrets.yaml"; ln -sfr $FILE /config/secrets.yaml; }

echo "Linking custom_components"
rm -rf /config/custom_components
ln -sfr custom_components /config/custom_components

# Extract .vscode, pylint, pyproject.toml, setup.cfg
#rsync -a -v --remove-source-files /tmp/container_content/ ./

FILE="requirements_component.txt"
[ -f $FILE ] && { echo "Installing requirements from requirements_component.txt"; pip3 install -r $FILE --use-deprecated=legacy-resolver; }
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ ulid-transform==0.9.0
urllib3>=1.26.5,<2
voluptuous-serialize==2.6.0
voluptuous==0.13.1
webrtc-noise-gain==1.2.3
#webrtc-noise-gain==1.2.3
yarl==1.9.4
zeroconf==0.131.0

Expand Down

0 comments on commit 578f516

Please sign in to comment.