Browse Source

added .env

Toastie 4 years ago
parent
commit
e1dacc6bdb
3 changed files with 7 additions and 0 deletions
  1. 2 0
      rfidac/.env
  2. 2 0
      rfidac/Dockerfile
  3. 3 0
      rfidac/docker-compose.yml

+ 2 - 0
rfidac/.env

@@ -0,0 +1,2 @@
+mpd_host=dudelbox
+mpd_files=Files/music/

+ 2 - 0
rfidac/Dockerfile

@@ -7,6 +7,8 @@ RUN echo "rfidac:x:100:105:RFIC AC,,,:/opt:/sbin/nologin" >> /etc/passwd \
  && pip3 install --upgrade pip setuptools \
  && apk add --no-cache linux-headers gcc musl-dev python3-dev \
  && pip3 install evdev
+ && apk rm linux-headers gcc musl-dev python3-dev
+ && apk add --no-cache mpc
 
 ADD rfid-test.py /opt/rfid-test.py
 

+ 3 - 0
rfidac/docker-compose.yml

@@ -6,3 +6,6 @@ services:
     image: toastie/rfidac
     devices:
       - '/dev/input/event0:/dev/input/event0'
+    environments:
+      - mpd_host:${mpd_host}
+      - mpd_files:${mpd_files}