fix docker time to GMT+7

This commit is contained in:
2026-05-05 16:29:38 +07:00
parent 16c35803a7
commit 37cce10422
3 changed files with 21 additions and 4 deletions
+11
View File
@@ -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
+4 -1
View File
@@ -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
+5 -2
View File
@@ -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