refactor code to nested folders

This commit is contained in:
Daniel Doubet committed 2022-06-30 13:38:56 -05:00
1 parent 70b0cca16c
commit 1b45514427
6 files changed
+79

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
FROM homeassistant/home-assistant:stable
COPY start.sh /tmp/start.sh
RUN chmod +x /tmp/start.sh
CMD ["bash","/tmp/start.sh"]
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
python -m homeassistant --config /config
+3
View File
@@ -0,0 +1,3 @@
FROM eclipse-mosquitto
COPY mosquitto.conf /mosquitto/config
+4
View File
@@ -0,0 +1,4 @@
listener 1883
allow_anonymous true
persistence true
persistence_location /mosquitto/data/
+43
View File
@@ -0,0 +1,43 @@
FROM balenalib/rpi-raspbian:buster AS builder
RUN install_packages cmake \
libavahi-compat-libdnssd-dev libplist-dev libssl-dev \
build-essential\
git
RUN install_packages libraspberrypi-dev libraspberrypi-doc
WORKDIR /usr/src/app/
RUN git clone https://github.com/FD-/RPiPlay.git
WORKDIR /usr/src/app/RPiPlay/build
RUN cmake --DCMAKE_CXX_FLAGS="-O3" --DCMAKE_C_FLAGS="-O3" .. &&\
make -j &&\
make install
RUN install_packages python3-pip python3-setuptools rsync
WORKDIR /rootfs
WORKDIR /usr/src/app
RUN pip3 install git+https://github.com/larsks/dockerize
RUN dockerize -n --verbose -g video -g audio -o /rootfs/ /usr/local/bin/rpiplay &&\
rm /rootfs/Dockerfile
FROM --platform=linux/arm/v6 busybox:stable
COPY --from=builder /rootfs/ ./
WORKDIR /usr/src/app/
COPY start.sh ./
COPY VERSION ./
RUN chmod +x ./start.sh
CMD ["sh", "./start.sh"]
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vc/lib
DEVICE_NAME="${AIRPIPLAY_NAME:="Air-Pi-Play@$HOSTNAME"}"
AUDIO_OUT="${AIRPIPLAY_AUDIO_OUT:="hdmi"}"
BACKGROUND="${AIRPIPLAY_BACKGROUND:="auto"}"
case $AIRPIPLAY_LATENCY_MODE in
1) LATENCY="-l";;
0) LATENCY="";;
esac
ROTATION="-r ${AIRPIPLAY_ROTATION:=""}"
FLIP="-f ${AIRPIPLAY_FLIP:=""}"
echo "Air-Pi-Play v$(cat VERSION) powered by RpiPlay"
echo "Device is discoverable as ${DEVICE_NAME}"
rpiplay -n $DEVICE_NAME -a $AUDIO_OUT -b $BACKGROUND $LATENCY $ROTATION $FLIP