Skip to content

Commit

Permalink
Docker changes for notification service under reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Riga committed Jan 8, 2020
1 parent 8e801fb commit 7f309e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
15 changes: 6 additions & 9 deletions docker-compose.notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@ services:
notification-temp:
build:
context: .
dockerfile: docker/notification/Dockerfile
dockerfile: notification/Dockerfile
restart: always
network_mode: "host"
privileged: true
volumes:
- /opt/fruitnanny/bin:/opt/fruitnanny/bin
depends_on:
- nginx
- janus
- fruitnanny
#command: /bin/bash
#tty: true
command: python3 /opt/fruitnanny/bin/temperature.py
command: python3 /opt/notification/temperature.py

notification-motion:
image: fruitnanny_notification-temp
build:
context: .
dockerfile: notification/Dockerfile
restart: always
network_mode: "host"
privileged: true
volumes:
- /opt/fruitnanny/bin:/opt/fruitnanny/bin
depends_on:
- nginx
- janus
- fruitnanny
- notification-temp
#command: /bin/bash
#tty: true
command: python3 /opt/fruitnanny/bin/motion.py
command: python3 /opt/notification/motion.py
10 changes: 5 additions & 5 deletions fruitnanny/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ FROM balenalib/raspberrypi3-debian-node:12.13-buster
RUN echo 'APT::Install-Recommends "false";' >/etc/apt/apt.conf.d/00recommends \
&& echo 'APT::Install-Suggests "false";' >>/etc/apt/apt.conf.d/00recommends \
&& apt-get update && apt-get upgrade && apt-get install -y \
dos2unix \
libgpiod2 \
python3 \
python3-pip \
wiringpi \
dos2unix \
libgpiod2 \
python3 \
python3-pip \
wiringpi \
&& pip3 install --upgrade RPI.GPIO adafruit-blinka adafruit-circuitpython-dht \
&& apt-get --purge -y autoremove && apt-get clean && rm -rf /tmp/* && rm -rf /var/lib/apt/lists/*

Expand Down
4 changes: 2 additions & 2 deletions gstreamer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ RUN echo 'APT::Install-Recommends "false";' >/etc/apt/apt.conf.d/00recommends \
&& rm -rf /tmp/*

RUN useradd -rm -d /home/pi -s /bin/bash -g users -G adm,dialout,sudo,audio,video,plugdev,input,netdev -u 1000 pi
COPY docker/gstreamer/audio_entry.sh /
COPY docker/gstreamer/audio_stream.sh /
COPY audio_entry.sh /
COPY audio_stream.sh /
7 changes: 5 additions & 2 deletions notification/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ivadim/fruitnanny-app
FROM balenalib/raspberrypi3-debian-node:12.13-buster

RUN apt-get update \
&& apt-get install -y libgpiod2 \
Expand All @@ -10,4 +10,7 @@ RUN apt-get update \
&& apt-get --purge remove -y $buildDeps && apt-get --purge -y autoremove \
&& apt-get clean \
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*

ADD . /opt/notification
WORKDIR /opt/notification

0 comments on commit 7f309e1

Please sign in to comment.