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:
|
services:
|
||||||
mediamtx:
|
mediamtx:
|
||||||
image: bluenviron/mediamtx:1-ffmpeg
|
#image: bluenviron/mediamtx:1-ffmpeg
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Ho_Chi_Minh
|
||||||
container_name: mediamtx
|
container_name: mediamtx
|
||||||
ports:
|
ports:
|
||||||
- 9997:9997/tcp
|
- 9997:9997/tcp
|
||||||
@@ -9,5 +12,5 @@ services:
|
|||||||
- 8189:8189/udp
|
- 8189:8189/udp
|
||||||
volumes:
|
volumes:
|
||||||
- ./mediamtx.yml:/mediamtx.yml
|
- ./mediamtx.yml:/mediamtx.yml
|
||||||
- ./recordings:/recordings
|
- ./recordings:/recordings
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -44,8 +44,11 @@ webrtc: true
|
|||||||
webrtcAddress: :8889
|
webrtcAddress: :8889
|
||||||
webrtcAllowOrigin: '*'
|
webrtcAllowOrigin: '*'
|
||||||
webrtcLocalUDPAddress: :8189
|
webrtcLocalUDPAddress: :8189
|
||||||
|
webrtcLocalTCPAddress: :8189
|
||||||
|
|
||||||
webrtcAdditionalHosts:
|
webrtcAdditionalHosts:
|
||||||
- 192.168.88.3
|
- 192.168.88.5
|
||||||
|
- ipcopd.ttcorp.net
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# PLAYBACK (optional - có thể bật sau)
|
# PLAYBACK (optional - có thể bật sau)
|
||||||
@@ -75,7 +78,7 @@ pathDefaults:
|
|||||||
recordFormat: fmp4
|
recordFormat: fmp4
|
||||||
recordPartDuration: 1s
|
recordPartDuration: 1s
|
||||||
recordSegmentDuration: 5m
|
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
|
# CAMERA PATHS
|
||||||
|
|||||||
Reference in New Issue
Block a user