fix(docs): isolate widget styles and add docker preview
This commit is contained in:
4 files changed
+44
-1
No files matched your search
@@ -1,7 +1,21 @@
|
||||
import BrowserOnly from "@docusaurus/BrowserOnly";
|
||||
import { useState } from "react";
|
||||
import { MantineProvider, Select, Stack, Text } from "@mantine/core";
|
||||
import "@mantine/core/styles.css";
|
||||
/* oxlint-disable import/no-unassigned-import -- Mantine component styles intentionally load for side effects. */
|
||||
import "@mantine/core/styles/Badge.css";
|
||||
import "@mantine/core/styles/Button.css";
|
||||
import "@mantine/core/styles/Combobox.css";
|
||||
import "@mantine/core/styles/Group.css";
|
||||
import "@mantine/core/styles/Input.css";
|
||||
import "@mantine/core/styles/Loader.css";
|
||||
import "@mantine/core/styles/Pill.css";
|
||||
import "@mantine/core/styles/PillsInput.css";
|
||||
import "@mantine/core/styles/Popover.css";
|
||||
import "@mantine/core/styles/ScrollArea.css";
|
||||
import "@mantine/core/styles/Stack.css";
|
||||
import "@mantine/core/styles/Text.css";
|
||||
import "@mantine/core/styles/UnstyledButton.css";
|
||||
/* oxlint-enable import/no-unassigned-import */
|
||||
|
||||
import {
|
||||
BUNDLED_CUSTOM_WIDGETS,
|
||||
|
||||
@@ -26,4 +26,14 @@ Run the disposable service integration test from the repository root:
|
||||
pnpm test:workshop
|
||||
```
|
||||
|
||||
## Production docs preview
|
||||
|
||||
Build the documentation and serve it from PocketBase using the same production image layout as the hosted Workshop:
|
||||
|
||||
```sh
|
||||
pnpm docker:docs
|
||||
```
|
||||
|
||||
Open `http://127.0.0.1:3003`. Set `DOCS_EXPOSE_PORT` to use another host port. The preview container is removed when it stops and does not persist PocketBase data.
|
||||
|
||||
Production data lives in `/pb_data`. The image serves the built Homarr documentation and Workshop UI from `/pb_public`.
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
DOCS_IMAGE=${DOCS_IMAGE:-homarr/docs:local}
|
||||
DOCS_EXPOSE_PORT=${DOCS_EXPOSE_PORT:-3003}
|
||||
|
||||
docker build \
|
||||
--target production \
|
||||
--file apps/workshop/Dockerfile \
|
||||
--tag "$DOCS_IMAGE" \
|
||||
.
|
||||
|
||||
exec docker run \
|
||||
--rm \
|
||||
--name homarr-docs \
|
||||
--publish "127.0.0.1:${DOCS_EXPOSE_PORT}:8090" \
|
||||
--env PB_ALLOWED_ORIGINS='*' \
|
||||
"$DOCS_IMAGE"
|
||||
@@ -23,6 +23,7 @@
|
||||
"db:studio": "pnpm -F db studio",
|
||||
"dev": "pnpm -F nextjs dev",
|
||||
"dev:docs": "pnpm -F @homarr/docs dev",
|
||||
"docker:docs": "sh apps/workshop/run-docs.sh",
|
||||
"docker:dev": "docker compose -f ./development/development.docker-compose.yml up",
|
||||
"format": "turbo format --continue -- --check",
|
||||
"format:fix": "turbo format --continue",
|
||||
|
||||
Reference in new issue
Block a user