mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Fix logs permission, create fake logs for devcontainer
This commit is contained in:
parent
8fad761774
commit
129ad5db1f
@ -192,8 +192,9 @@ CMD []
|
|||||||
# Frigate deps with Node.js and NPM for devcontainer
|
# Frigate deps with Node.js and NPM for devcontainer
|
||||||
FROM deps AS devcontainer
|
FROM deps AS devcontainer
|
||||||
|
|
||||||
# Do not start frigate on devcontainer
|
# Do not start the actual Frigate service on devcontainer as it will be started by VSCode
|
||||||
RUN rm -rf /etc/services.d/frigate
|
# But start a fake service for simulating the logs
|
||||||
|
COPY docker/fake_frigate_run /etc/services.d/frigate/run
|
||||||
|
|
||||||
# Install Node 16
|
# Install Node 16
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
|||||||
8
docker/fake_frigate_run
Executable file
8
docker/fake_frigate_run
Executable 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
|
||||||
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
set -o errexit -o nounset -o pipefail
|
set -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
mkdir -p /dev/shm/logs
|
|
||||||
chown nobody:nogroup /dev/shm/logs
|
dirs=(/dev/shm/logs/frigate /dev/shm/logs/go2rtc /dev/shm/logs/nginx)
|
||||||
chmod 02755 /dev/shm/logs
|
|
||||||
|
mkdir -p "${dirs[@]}"
|
||||||
|
chown nobody:nogroup "${dirs[@]}"
|
||||||
|
chmod 02755 "${dirs[@]}"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# Start the Frigate service
|
# Start the Frigate service
|
||||||
|
|
||||||
set -o errexit -o nounset -o pipefail -o xtrace
|
set -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
cd /opt/frigate
|
cd /opt/frigate
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user