From 7f309e1f6916206019b0f044fa8401c15efb9201 Mon Sep 17 00:00:00 2001 From: Ray Riga <4710022-rayrpf@users.noreply.gitlab.com> Date: Tue, 7 Jan 2020 20:53:44 -0500 Subject: [PATCH] Docker changes for notification service under reorg --- docker-compose.notification.yml | 15 ++++++--------- fruitnanny/Dockerfile | 10 +++++----- gstreamer/Dockerfile | 4 ++-- notification/Dockerfile | 7 +++++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docker-compose.notification.yml b/docker-compose.notification.yml index 6d4b001..74668b3 100644 --- a/docker-compose.notification.yml +++ b/docker-compose.notification.yml @@ -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 \ No newline at end of file + command: python3 /opt/notification/motion.py diff --git a/fruitnanny/Dockerfile b/fruitnanny/Dockerfile index ef83ce6..cefc57c 100644 --- a/fruitnanny/Dockerfile +++ b/fruitnanny/Dockerfile @@ -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/* diff --git a/gstreamer/Dockerfile b/gstreamer/Dockerfile index 5aea3b7..cf55fa8 100644 --- a/gstreamer/Dockerfile +++ b/gstreamer/Dockerfile @@ -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 / diff --git a/notification/Dockerfile b/notification/Dockerfile index 9181ace..a10d003 100644 --- a/notification/Dockerfile +++ b/notification/Dockerfile @@ -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 \ @@ -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/* \ No newline at end of file + && rm -rf /var/lib/apt/lists/* + +ADD . /opt/notification +WORKDIR /opt/notification