mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-21 06:54:25 +00:00
545e2665f3
# Which Problems Are Solved - Docs code blocks that display imported files (YAML configs, Go examples) render as unstyled plain text with no syntax highlighting, unlike fenced code blocks which go through `rehypeCode`/Shiki # How the Problems Are Solved - Deleted `components/docusaurus/code-block.tsx` entirely — no custom wrapper is needed anymore - Replaced all usages with `DynamicCodeBlock` from `fumadocs-ui/components/dynamic-codeblock` directly in MDX files; it handles SSR pre-rendering through the same Shiki pipeline as all other code blocks - Raw file content (YAML, Go) is imported as strings via webpack's existing `asset/source` rule already configured in `next.config.mjs` — no new infrastructure required - In `_proxy_guide_tls_mode.mdx`, the `Commands` JSX component was refactored from concatenated JSX array children to a single template literal string, which is what `DynamicCodeBlock` (and any string-based highlighter) requires - All changes applied to both non-versioned docs and versioned snapshots (v4.10, v4.11) # Additional Changes None. # Additional Context - Affected MDX files: YAML config files under `self-hosting/manage/configure/`, reverse-proxy guides, `self-hosting/deploy/compose.mdx`, and the actions `testing-request-signature.mdx` guide <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>code block style is weird</issue_title> > <issue_description>### Preflight Checklist > > - [x] I could not find a solution in the existing issues, docs, nor discussions > - [x] I have joined the [ZITADEL chat](https://zitadel.com/chat) > > ### Describe the docs your are missing or that are wrong > > This hurts my eyes: > > <img width="867" height="525" alt="Image" src="https://github.com/user-attachments/assets/b7b66d92-56e1-4e0a-8dba-3cab448930fe" /> > > ### Additional Context > > _No response_</issue_description> > > <agent_instructions>the user reported a weirdly styled code block in the docs page where we used to display yaml files. Investigate the docs and fix the styling</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@fforootd</author><body> > haha, ok that is certainly weird, let me look at that.</body></comment_new> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes zitadel/zitadel#11645 <!-- START COPILOT CODING AGENT TIPS --> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: fforootd <[email protected]> Co-authored-by: Florian Forster <[email protected]>
74 lines
3.1 KiB
Plaintext
74 lines
3.1 KiB
Plaintext
---
|
|
title: Download and adjust the example configuration file containing standard configuration
|
|
---
|
|
|
|
import ExampleZitadelConfig from './example-zitadel-config.yaml';
|
|
import ExampleZitadelSecrets from './example-zitadel-secrets.yaml';
|
|
import ExampleZitadelInitSteps from './example-zitadel-init-steps.yaml';
|
|
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
|
|
|
|
### Configure by Files
|
|
|
|
By executing the commands below, you will download the following files:
|
|
|
|
<details>
|
|
<summary>example-zitadel-config.yaml</summary>
|
|
<DynamicCodeBlock lang="yaml" code={ExampleZitadelConfig} />
|
|
</details>
|
|
|
|
<details>
|
|
<summary>example-zitadel-secrets.yaml</summary>
|
|
<DynamicCodeBlock lang="yaml" code={ExampleZitadelSecrets} />
|
|
</details>
|
|
|
|
<details>
|
|
<summary>example-zitadel-init-steps.yaml</summary>
|
|
<DynamicCodeBlock lang="yaml" code={ExampleZitadelInitSteps} />
|
|
</details>
|
|
|
|
```bash
|
|
# Download and adjust the example configuration file containing standard configuration
|
|
wget https://raw.githubusercontent.com/zitadel/zitadel/main/apps/docs/content/self-hosting/manage/configure/example-zitadel-config.yaml
|
|
|
|
# Download and adjust the example configuration file containing secret configuration
|
|
wget https://raw.githubusercontent.com/zitadel/zitadel/main/apps/docs/content/self-hosting/manage/configure/example-zitadel-secrets.yaml
|
|
|
|
# Download and adjust the example configuration file containing database initialization configuration
|
|
wget https://raw.githubusercontent.com/zitadel/zitadel/main/apps/docs/content/self-hosting/manage/configure/example-zitadel-init-steps.yaml
|
|
|
|
# A single ZITADEL instance always needs the same 32 characters long masterkey
|
|
# If you haven't done so already, you can generate a new one
|
|
# The key must be passed as argument
|
|
ZITADEL_MASTERKEY="$(LC_ALL=C tr -dc '[:graph:]' </dev/urandom | head -c 32)"
|
|
|
|
# Pass zitadel configuration by configuration files
|
|
zitadel start-from-init \
|
|
--config ./example-zitadel-config.yaml \
|
|
--config ./example-zitadel-secrets.yaml \
|
|
--steps ./example-zitadel-init-steps.yaml \
|
|
--masterkey "${ZITADEL_MASTERKEY}"
|
|
```
|
|
|
|
### Configure by Environment Variables
|
|
|
|
```bash
|
|
# Set runtime environment variables
|
|
export ZITADEL_DATABASE_POSTGRES_HOST=my.database
|
|
export ZITADEL_DATABASE_POSTGRES_PORT=5432
|
|
export ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
|
|
export ZITADEL_DATABASE_POSTGRES_USER_USERNAME=my_zitadel_db_user
|
|
export ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=Secret_DB_User_Password
|
|
export ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
|
|
export ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=root
|
|
export ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
|
|
export ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME="root"
|
|
export ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD="RootPassword1!"
|
|
|
|
# A single ZITADEL instance always needs the same 32 bytes long masterkey
|
|
# Generate one to a file if you haven't done so already and pass it as environment variable
|
|
LC_ALL=C tr -dc '[:graph:]' </dev/urandom | head -c 32 > ./zitadel-masterkey
|
|
|
|
# Let the zitadel binary read configuration from environment variables
|
|
zitadel start-from-init --masterkey "${ZITADEL_MASTERKEY}" --tlsMode disabled --masterkeyFile ./zitadel-masterkey
|
|
```
|