mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
Refactor s6 scripts to the new format (#5135)
* Refator s6 scripts to the new format * Remove unneeded workaround * Migrate logging to new s6 format * Remove more unnecessary s6 variables * Fix prepare-log and when go2rtc is not present in config * Restart the whole container if either Frigate or go2rtc fails * D * Fix service name in finish * Fix nginx finish comment * Restart improvements * Fix devcontainer * Fix format * Update Dockerfile Co-authored-by: Felipe Santos <felipecassiors@gmail.com> Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -192,22 +192,10 @@ RUN ldconfig
|
||||
EXPOSE 5000
|
||||
EXPOSE 1935
|
||||
EXPOSE 8554
|
||||
EXPOSE 8555
|
||||
EXPOSE 8555/tcp 8555/udp
|
||||
|
||||
# Fails if cont-init.d fails
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
# Wait indefinitely for cont-init.d to finish before starting services
|
||||
ENV S6_CMD_WAIT_FOR_SERVICES=1
|
||||
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
|
||||
# Give services (including Frigate) 30 seconds to stop before killing them
|
||||
# But this is not working currently because of:
|
||||
# https://github.com/just-containers/s6-overlay/issues/503
|
||||
ENV S6_SERVICES_GRACETIME=30000
|
||||
# Configure logging to prepend timestamps, log to stdout, keep 0 archives and rotate on 10MB
|
||||
ENV S6_LOGGING_SCRIPT="T 1 n0 s10000000 T"
|
||||
# TODO: remove after a new version of s6-overlay is released. See:
|
||||
# https://github.com/just-containers/s6-overlay/issues/460#issuecomment-1327127006
|
||||
ENV S6_SERVICES_READYTIME=50
|
||||
|
||||
ENTRYPOINT ["/init"]
|
||||
CMD []
|
||||
@@ -217,7 +205,7 @@ FROM deps AS devcontainer
|
||||
|
||||
# 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
|
||||
COPY docker/fake_frigate_run /etc/s6-overlay/s6-rc.d/frigate/run
|
||||
|
||||
# Install Node 16
|
||||
RUN apt-get update \
|
||||
|
Reference in New Issue
Block a user