|
1 # The Scrypted docker-compose.yml file typically resides at: |
|
2 # ~/.scrypted/docker-compose.yml |
|
3 |
|
4 |
|
5 # Scrypted NVR Storage (Optional Network Volume: Part 1 of 3) |
|
6 # Example volumes SMB (CIFS) and NFS. |
|
7 # Uncomment only one. |
|
8 # volumes: |
|
9 # nvr: |
|
10 # driver_opts: |
|
11 # type: cifs |
|
12 # o: username=[username],password=[password],vers=3.0,file_mode=0777,dir_mode=0777 |
|
13 # device: //[ip-address]/[path-to-directory] |
|
14 # nvr: |
|
15 # driver_opts: |
|
16 # type: "nfs" |
|
17 # o: "addr=[ip-address],nolock,soft,rw" |
|
18 # device: ":[path-to-directory]" |
|
19 |
|
20 services: |
|
21 scrypted: |
|
22 environment: |
|
23 # Scrypted NVR Storage (Part 2 of 3) |
|
24 |
|
25 # Uncomment the next line to configure the NVR plugin to store recordings |
|
26 # use the /nvr directory within the container. This can also be configured |
|
27 # within the plugin manually. |
|
28 # The drive or network share will ALSO need to be configured in the volumes |
|
29 # section below. |
|
30 # - SCRYPTED_NVR_VOLUME=/nvr |
|
31 |
|
32 - SCRYPTED_WEBHOOK_UPDATE_AUTHORIZATION=Bearer {{scrypted_auth_key}} |
|
33 - SCRYPTED_WEBHOOK_UPDATE=http://localhost:{{scrypted_auto_update_port}}/v1/update |
|
34 |
|
35 # Avahi can be used for network discovery by passing in the host daemon |
|
36 # or running the daemon inside the container. Choose one or the other. |
|
37 # Uncomment next line to run avahi-daemon inside the container. |
|
38 # See volumes and security_opt section below to use the host daemon. |
|
39 # - SCRYPTED_DOCKER_AVAHI=true |
|
40 |
|
41 # NVIDIA (Part 1 of 4) |
|
42 # - NVIDIA_VISIBLE_DEVICES=all |
|
43 # - NVIDIA_DRIVER_CAPABILITIES=all |
|
44 |
|
45 # NVIDIA (Part 2 of 4) |
|
46 # runtime: nvidia |
|
47 |
|
48 # NVIDIA (Part 3 of 4) - Use NVIDIA image, and remove subsequent default image. |
|
49 # image: ghcr.io/koush/scrypted:nvidia |
|
50 image: ghcr.io/koush/scrypted |
|
51 |
|
52 volumes: |
|
53 # NVIDIA (Part 4 of 4) |
|
54 # - /etc/OpenCL/vendors/nvidia.icd:/etc/OpenCL/vendors/nvidia.icd |
|
55 |
|
56 # Scrypted NVR Storage (Part 3 of 3) |
|
57 |
|
58 # Modify to add the additional volume for Scrypted NVR. |
|
59 # The following example would mount the /mnt/sda/video path on the host |
|
60 # to the /nvr path inside the docker container. |
|
61 # - /mnt/media/video:/nvr |
|
62 |
|
63 # Or use a network mount from one of the CIFS/NFS examples at the top of this file. |
|
64 # - type: volume |
|
65 # source: nvr |
|
66 # target: /nvr |
|
67 # volume: |
|
68 # nocopy: true |
|
69 |
|
70 # Uncomment the following lines to use Avahi daemon from the host. |
|
71 # Ensure Avahi is running on the host machine: |
|
72 # It can be installed with: sudo apt-get install avahi-daemon |
|
73 # This is not compatible with running avahi inside the container (see above). |
|
74 # Also, uncomment the lines under security_opt |
|
75 - /var/run/dbus:/var/run/dbus |
|
76 - /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket |
|
77 |
|
78 # Default volume for the Scrypted database. Typically should not be changed. |
|
79 - {{scrypted_dir}}/volume:/server/volume |
|
80 # Uncomment the following lines to use Avahi daemon from the host |
|
81 # Without this, AppArmor will block the container's attempt to talk to Avahi via dbus |
|
82 security_opt: |
|
83 - apparmor:unconfined |
|
84 devices: [ |
|
85 # uncomment the common systems devices to pass |
|
86 # them through to docker. |
|
87 |
|
88 # all usb devices, such as coral tpu |
|
89 # "/dev/bus/usb:/dev/bus/usb", |
|
90 |
|
91 # hardware accelerated video decoding, opencl, etc. |
|
92 # "/dev/dri:/dev/dri", |
|
93 |
|
94 # uncomment below as necessary. |
|
95 # zwave usb serial device |
|
96 |
|
97 # "/dev/ttyACM0:/dev/ttyACM0", |
|
98 |
|
99 # coral PCI devices |
|
100 # "/dev/apex_0:/dev/apex_0", |
|
101 # "/dev/apex_1:/dev/apex_1", |
|
102 ] |
|
103 |
|
104 container_name: scrypted |
|
105 restart: unless-stopped |
|
106 network_mode: host |
|
107 |
|
108 # logging is noisy and will unnecessarily wear on flash storage. |
|
109 # scrypted has per device in memory logging that is preferred. |
|
110 # enable the log file if enhanced debugging is necessary. |
|
111 logging: |
|
112 driver: "none" |
|
113 # driver: "json-file" |
|
114 # options: |
|
115 # max-size: "10m" |
|
116 # max-file: "10" |
|
117 labels: |
|
118 - "com.centurylinklabs.watchtower.scope=scrypted" |
|
119 |
|
120 # watchtower manages updates for Scrypted. |
|
121 watchtower: |
|
122 environment: |
|
123 - WATCHTOWER_HTTP_API_TOKEN={{scrypted_auth_key}} |
|
124 - WATCHTOWER_HTTP_API_UPDATE=true |
|
125 - WATCHTOWER_SCOPE=scrypted |
|
126 # remove the following line to never allow docker to auto update. |
|
127 # this is not recommended. |
|
128 - WATCHTOWER_HTTP_API_PERIODIC_POLLS=true |
|
129 image: containrrr/watchtower |
|
130 container_name: scrypted-watchtower |
|
131 restart: unless-stopped |
|
132 volumes: |
|
133 - /var/run/docker.sock:/var/run/docker.sock |
|
134 labels: |
|
135 - "com.centurylinklabs.watchtower.scope=scrypted" |
|
136 ports: |
|
137 # The auto update port 10444 can be configured |
|
138 # Must match the port in the auto update url above. |
|
139 - {{scrypted_auto_update_port}}:8080 |
|
140 # check for updates once an hour (interval is in seconds) |
|
141 command: --interval 3600 --cleanup --scope scrypted |