From e878db8d6cfb54fc9941c947d99b672df3117c24 Mon Sep 17 00:00:00 2001 From: Ludovic <54670129+lbr38@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:29:33 +0200 Subject: [PATCH] patch --- docker/Dockerfile | 3 +-- docker/docker-compose-empty-dev.yml | 22 ++++++++++++++++++++++ docker/init | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 docker/docker-compose-empty-dev.yml diff --git a/docker/Dockerfile b/docker/Dockerfile index 8ddd8aae..ab02a123 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -31,9 +31,8 @@ RUN apt-get update -y # Install nginx and PHP 8.3 RUN apt-get install nginx php8.3-fpm php8.3-cli php8.3-sqlite3 php8.3-curl php8.3-yaml sqlite3 -y -# Install motion and make sure it's stopped +# Install motion RUN apt-get install motion -y -RUN service motion stop # Clone project in the container RUN git clone https://github.com/lbr38/motion-ui.git /tmp/motionui diff --git a/docker/docker-compose-empty-dev.yml b/docker/docker-compose-empty-dev.yml new file mode 100644 index 00000000..af64d619 --- /dev/null +++ b/docker/docker-compose-empty-dev.yml @@ -0,0 +1,22 @@ + +--- +version: "3" +services: + motionui-dev: + container_name: motionui-dev + image: motionui-dev + build: + context: . + dockerfile: Dockerfile + args: + env: devel + fqdn: motionui-dev.localhost + restart: unless-stopped + ports: + - "8888:8080" + volumes: + - /etc/localtime:/etc/localtime:ro + - /var/lib/docker/volumes/motionui-dev-logs:/var/log/nginx + - /var/lib/docker/volumes/motionui-dev-www:/var/www/motionui + - /var/lib/docker/volumes/motionui-dev-data:/var/lib/motionui + - /var/lib/docker/volumes/motionui-dev-captures:/var/lib/motion diff --git a/docker/init b/docker/init index e37b61a0..d41859e4 100644 --- a/docker/init +++ b/docker/init @@ -6,6 +6,7 @@ GO2RTC_DIR="/var/lib/motionui/go2rtc" # Make sure motion service is stopped /usr/sbin/service motion stop +killall motion /bin/bash $WWW_DIR/bin/motionui -p & chown -R www-data:motionui $DATA_DIR