mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-07 05:55:27 +03:00
docs: RTSP password is optional
This commit is contained in:
parent
bb5e01ac45
commit
9e72a825f3
@ -15,7 +15,7 @@ export interface GeneratorInput {
|
|||||||
enabledPorts: string[];
|
enabledPorts: string[];
|
||||||
configPath: string;
|
configPath: string;
|
||||||
mediaPath: string;
|
mediaPath: string;
|
||||||
rtspPassword: string;
|
rtspPassword?: string;
|
||||||
timezone: string;
|
timezone: string;
|
||||||
shmSize: string;
|
shmSize: string;
|
||||||
nvidiaGpuCount?: string;
|
nvidiaGpuCount?: string;
|
||||||
@ -99,7 +99,7 @@ function buildPorts(enabledPorts: string[]): string[] {
|
|||||||
function buildEnvironment(
|
function buildEnvironment(
|
||||||
device: DeviceConfig,
|
device: DeviceConfig,
|
||||||
hwEnv: Record<string, string>,
|
hwEnv: Record<string, string>,
|
||||||
rtspPassword: string,
|
rtspPassword: string | undefined,
|
||||||
timezone: string
|
timezone: string
|
||||||
): string[] {
|
): string[] {
|
||||||
const allEnv: Record<string, string> = {
|
const allEnv: Record<string, string> = {
|
||||||
@ -107,11 +107,15 @@ function buildEnvironment(
|
|||||||
...(device.env ?? {}),
|
...(device.env ?? {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
const lines: string[] = [
|
const lines: string[] = [" environment:"];
|
||||||
" environment:",
|
|
||||||
` FRIGATE_RTSP_PASSWORD: "${rtspPassword}" # RTSP password — change to your own`,
|
if (rtspPassword) {
|
||||||
` TZ: "${timezone}" # Timezone`,
|
lines.push(
|
||||||
];
|
` FRIGATE_RTSP_PASSWORD: "${rtspPassword}" # RTSP password — change to your own`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
lines.push(` TZ: "${timezone}" # Timezone`);
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(allEnv)) {
|
for (const [key, value] of Object.entries(allEnv)) {
|
||||||
lines.push(` ${key}: "${value}"`);
|
lines.push(` ${key}: "${value}"`);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export function useConfigGenerator() {
|
|||||||
const [nvidiaGpuDeviceId, setNvidiaGpuDeviceId] = useState("");
|
const [nvidiaGpuDeviceId, setNvidiaGpuDeviceId] = useState("");
|
||||||
const [configPath, setConfigPath] = useState("");
|
const [configPath, setConfigPath] = useState("");
|
||||||
const [mediaPath, setMediaPath] = useState("");
|
const [mediaPath, setMediaPath] = useState("");
|
||||||
const [rtspPassword, setRtspPassword] = useState("password");
|
const [rtspPassword, setRtspPassword] = useState("");
|
||||||
const [timezone, setTimezone] = useState("");
|
const [timezone, setTimezone] = useState("");
|
||||||
const [shmSize, setShmSize] = useState("512mb");
|
const [shmSize, setShmSize] = useState("512mb");
|
||||||
const [shmSizeError, setShmSizeError] = useState(false);
|
const [shmSizeError, setShmSizeError] = useState(false);
|
||||||
@ -166,7 +166,7 @@ export function useConfigGenerator() {
|
|||||||
enabledPorts: enabledPortLines,
|
enabledPorts: enabledPortLines,
|
||||||
configPath: configPath || "/path/to/your/config",
|
configPath: configPath || "/path/to/your/config",
|
||||||
mediaPath: mediaPath || "/path/to/your/storage",
|
mediaPath: mediaPath || "/path/to/your/storage",
|
||||||
rtspPassword: rtspPassword || "password",
|
rtspPassword,
|
||||||
timezone: timezone || Intl.DateTimeFormat().resolvedOptions().timeZone || "Etc/UTC",
|
timezone: timezone || Intl.DateTimeFormat().resolvedOptions().timeZone || "Etc/UTC",
|
||||||
shmSize: shmSize || "512mb",
|
shmSize: shmSize || "512mb",
|
||||||
nvidiaGpuCount,
|
nvidiaGpuCount,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user