Fix logs permission, create fake logs for devcontainer

This commit is contained in:
Felipe Santos 2022-12-05 15:21:11 -03:00
parent 8fad761774
commit 129ad5db1f
4 changed files with 18 additions and 6 deletions

View File

@ -192,8 +192,9 @@ CMD []
# Frigate deps with Node.js and NPM for devcontainer
FROM deps AS devcontainer
# Do not start frigate on devcontainer
RUN rm -rf /etc/services.d/frigate
# Do not start the actual Frigate service on devcontainer as it will be started by VSCode
# But start a fake service for simulating the logs
COPY docker/fake_frigate_run /etc/services.d/frigate/run
# Install Node 16
RUN apt-get update \

8
docker/fake_frigate_run Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# shellcheck shell=bash
# Start the fake Frigate service
while true; do
echo "The fake Frigate service is running..."
sleep 5s
done

View File

@ -4,6 +4,9 @@
set -o errexit -o nounset -o pipefail
mkdir -p /dev/shm/logs
chown nobody:nogroup /dev/shm/logs
chmod 02755 /dev/shm/logs
dirs=(/dev/shm/logs/frigate /dev/shm/logs/go2rtc /dev/shm/logs/nginx)
mkdir -p "${dirs[@]}"
chown nobody:nogroup "${dirs[@]}"
chmod 02755 "${dirs[@]}"

View File

@ -2,7 +2,7 @@
# shellcheck shell=bash
# Start the Frigate service
set -o errexit -o nounset -o pipefail -o xtrace
set -o errexit -o nounset -o pipefail
cd /opt/frigate