mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Add documentation build step to Dockerfile and update Documentation link in Sidebar
This commit is contained in:
parent
846a180a7b
commit
7205d4d6a3
@ -1,5 +1,6 @@
|
||||
README.md
|
||||
docs/
|
||||
docs/node_modules
|
||||
docs/build
|
||||
.gitignore
|
||||
debug
|
||||
config/
|
||||
|
||||
@ -30,6 +30,13 @@ WORKDIR /rootfs/usr/local/go2rtc/bin
|
||||
RUN wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v1.5.0/go2rtc_linux_${TARGETARCH}" \
|
||||
&& chmod +x go2rtc
|
||||
|
||||
FROM --platform=$BUILDPLATFORM node:16 AS docs-build
|
||||
ADD ./docs /docs
|
||||
ADD labelmap.txt /
|
||||
WORKDIR /docs
|
||||
RUN sed -i'' "s/baseUrl: '\/',/baseUrl: '\/docs\/',/" ./docusaurus.config.js
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
####
|
||||
#
|
||||
@ -246,6 +253,7 @@ WORKDIR /opt/frigate/
|
||||
COPY frigate frigate/
|
||||
COPY migrations migrations/
|
||||
COPY --from=web-build /work/dist/ web/
|
||||
COPY --from=docs-build /docs/build/ web/docs/
|
||||
|
||||
# Frigate final container
|
||||
FROM deps AS frigate
|
||||
|
||||
@ -6,6 +6,7 @@ import { ENV } from './env';
|
||||
import { useMemo } from 'preact/hooks'
|
||||
import useSWR from 'swr';
|
||||
import NavigationDrawer, { Destination, Separator } from './components/NavigationDrawer';
|
||||
import { baseUrl } from './api/baseUrl';
|
||||
|
||||
export default function Sidebar() {
|
||||
const { data: config } = useSWR('config');
|
||||
@ -57,7 +58,7 @@ export default function Sidebar() {
|
||||
<Separator />
|
||||
</Fragment>
|
||||
) : null}
|
||||
<Destination className="self-end" href="https://docs.frigate.video" text="Documentation" />
|
||||
<Destination className="self-end" href={baseUrl+"/docs"} text="Documentation" />
|
||||
<Destination className="self-end" href="https://github.com/blakeblackshear/frigate" text="GitHub" />
|
||||
</NavigationDrawer>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user