fix docker time to GMT+7
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Dockerfile
|
||||
FROM bluenviron/mediamtx:1-ffmpeg
|
||||
|
||||
# Chuyển sang root để cài gói
|
||||
USER root
|
||||
RUN apk add --no-cache tzdata && \
|
||||
ln -snf /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime && \
|
||||
echo "Asia/Ho_Chi_Minh" > /etc/timezone
|
||||
|
||||
# Đặt biến môi trường
|
||||
ENV TZ=Asia/Ho_Chi_Minh
|
||||
@@ -1,6 +1,9 @@
|
||||
services:
|
||||
mediamtx:
|
||||
image: bluenviron/mediamtx:1-ffmpeg
|
||||
#image: bluenviron/mediamtx:1-ffmpeg
|
||||
build: .
|
||||
environment:
|
||||
- TZ=Asia/Ho_Chi_Minh
|
||||
container_name: mediamtx
|
||||
ports:
|
||||
- 9997:9997/tcp
|
||||
@@ -9,5 +12,5 @@ services:
|
||||
- 8189:8189/udp
|
||||
volumes:
|
||||
- ./mediamtx.yml:/mediamtx.yml
|
||||
- ./recordings:/recordings
|
||||
- ./recordings:/recordings
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -44,8 +44,11 @@ webrtc: true
|
||||
webrtcAddress: :8889
|
||||
webrtcAllowOrigin: '*'
|
||||
webrtcLocalUDPAddress: :8189
|
||||
webrtcLocalTCPAddress: :8189
|
||||
|
||||
webrtcAdditionalHosts:
|
||||
- 192.168.88.3
|
||||
- 192.168.88.5
|
||||
- ipcopd.ttcorp.net
|
||||
|
||||
############################################
|
||||
# PLAYBACK (optional - có thể bật sau)
|
||||
@@ -75,7 +78,7 @@ pathDefaults:
|
||||
recordFormat: fmp4
|
||||
recordPartDuration: 1s
|
||||
recordSegmentDuration: 5m
|
||||
recordDeleteAfter: 0s # 0s là không tự động xóa, đặt thời gian xóa nếu ổ cứng có giới hạn
|
||||
recordDeleteAfter: 3600s # 0s là không tự động xóa, đặt thời gian xóa nếu ổ cứng có giới hạn
|
||||
|
||||
############################################
|
||||
# CAMERA PATHS
|
||||
|
||||
Reference in New Issue
Block a user