-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (87 loc) · 2.86 KB
/
docker-compose.yml
File metadata and controls
94 lines (87 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: '3'
services:
mysql:
image: mysql:latest
container_name: mysql
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=grafana_db
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/var/lib/grafana/dashboards/openvidu_dashboard.json
# volumes:
# - ../mysql:/var/lib/mysql
grafana:
image: grafana/grafana:8.5.22
container_name: grafana
restart: always
user: "$UID:$GID"
ports:
- "3000:3000"
depends_on:
- mysql
environment:
- MYSQL_URL=mysql
- MYSQL_DATABASE=grafana_db
- MYSQL_PASSWORD=password
- MYSQL_USER=root
volumes:
- ../grafana/storage:/var/lib/grafana
- ../grafana/custom.ini:/etc/grafana/grafana.ini
- ../openvidu-video-panel:/var/lib/grafana/plugins
- ../grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ../grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ../grafana/dashboards:/var/lib/grafana/dashboards
- ../grafana/datasources:/var/lib/grafana/datasources
openvidu-server:
image: openvidu/openvidu-dev:2.29.0
container_name: openvidu-server
restart: always
ports:
- "4443:4443"
extra_hosts:
- "host.docker.internal:host-gateway" # Necesita acceder a la red local para poder acceder a la app de RTSP
network_mode: "bridge"
depends_on:
- mysql
environment:
- OPENVIDU_RECORDING=true
- OPENVIDU_RECORDING_AUTOSTOP_TIMEOUT=0
- OPENVIDU_RECORDING_PATH=$PWD/rtsp-application/recordings
- OPENVIDU_RECORDING_PUBLIC_ACCESS=true
- OPENVIDU_WEBHOOK=true
- OPENVIDU_WEBHOOK_ENDPOINT=http://host.docker.internal:5000/openvidu/webhook
- OPENVIDU_WEBHOOK_EVENTS=["recordingStatusChanged","sessionCreated"]
volumes:
- ../rtsp-application/recordings:$PWD/rtsp-application/recordings
- /var/run/docker.sock:/var/run/docker.sock
# rtsp-application:
# build:
# context: ../rtsp-application
# dockerfile: Dockerfile
# container_name: rtsp-application
# restart: on-failure
# ports:
# - "5000:5000"
# depends_on:
# - openvidu-server
# - mysql
# environment:
# - SERVER_PORT=5000
# - OPENVIDU_URL=openvidu-server:4443
# - OPENVIDU_SECRET=MY_SECRET
# - SESSION_NAME=RTSP_SESSION
# - RTSP_CAMERAS_URLS=rtsp://192.168.1.41/stream1,rtsp://192.168.1.41/stream2
# - RTSP_CAMERA_USERNAME=openvidu
# - RTSP_CAMERA_PASSWORD=openvidu
# - RTSP_MODE=AUTO
# - RECORDING_DURATION_SECONDS=10
# - DATA_GENERATION_STATUS=ENABLED
# - DATA_GENERATION_INTERVAL_SECONDS=10
# - DB_HOSTNAME=mysql
# - DB_USERNAME=root
# - DB_PASSWORD=password
# - DB_NAME=grafana_db
# - DB_VIDEO_TABLE=video_data
# - DB_METRIC_TABLE=metric_data