refactor code to nested folders
This commit is contained in:
1 parent
70b0cca16c
commit
1b45514427
6 files changed
+79
No files matched your search
@@ -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"]
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
python -m homeassistant --config /config
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM eclipse-mosquitto
|
||||
|
||||
COPY mosquitto.conf /mosquitto/config
|
||||
@@ -0,0 +1,4 @@
|
||||
listener 1883
|
||||
allow_anonymous true
|
||||
persistence true
|
||||
persistence_location /mosquitto/data/
|
||||
@@ -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"]
|
||||
@@ -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
|
||||
Reference in new issue
Block a user