Skip to content

Commit 87f6585

Browse files
author
Lugh (Druid Bot)
committed
docs: Fix scroll duplication in CLI section
PROBLEM: - docs/cli/scroll.md had complete scroll.yaml documentation (118 lines) - This duplicated EVERYTHING in docs/scrolls/introduction.md - CLI intro.md also had redundant scroll explanations SOLUTION: 1. CLI scroll.md (118 → 36 lines, 70% cut) - Removed entire scroll.yaml format documentation - Removed field descriptions - Removed examples - Now just: Quick reference + link to full docs - Single source of truth: docs/scrolls/introduction.md 2. CLI intro.md (cleaned up) - Simplified scroll mention to one line - Changed link from /cli/scroll to ../scrolls/introduction.md - Removed redundant explanations RESULT: - No more duplication between CLI and Scrolls sections - Users directed to single authoritative scroll documentation - CLI section now references, not duplicates Build passing.
1 parent db90386 commit 87f6585

2 files changed

Lines changed: 31 additions & 107 deletions

File tree

docs/cli/intro.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ This is the documentation for [druid-cli](https://github.com/highcard-dev/druid-
1111
It is recommended, but not manditory to use the druid-cli inside a container, to ensure all the coditions are meet for the process.
1212
Simpler setups should also work without containers.
1313

14-
Processes and process structures **are called scrolls**.
15-
A scroll is an OCI Artifact, wich you can store in any OCI registry, like Dockerhub.
14+
Processes are managed via **scrolls** - OCI artifacts stored in registries. See [Scroll System](../scrolls/introduction.md) for details.
1615

1716
## Architecture
1817

@@ -26,7 +25,7 @@ A scroll is an OCI Artifact, wich you can store in any OCI registry, like Docker
2625
F[Start Process and Log Watcher] --> G[Start Webserver]
2726
```
2827

29-
A command can depend on the success of a different command. You can see more in the [scroll section](/cli/scroll).
28+
Commands can depend on other commands. See [Scroll System](../scrolls/introduction.md) for details.
3029

3130
## Installation
3231

docs/cli/scroll.md

Lines changed: 29 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,47 @@
11
---
2-
sidebar_position: 2
2+
sidebar_position: 3
3+
title: Scrolls
34
---
45

5-
# Scroll
6+
# Scrolls
67

7-
A Scroll is an [OCI Artifact](https://github.com/opencontainers/image-spec). It consits of files to bootstrap and maintain the app you want to run ([see Layout](#layout)) and meta data, that give context to the app.
8+
Scrolls are OCI artifacts that define how to deploy applications on Druid.
89

9-
## Layout
10+
**Full documentation:** See [Scroll System](../scrolls/introduction.md)
1011

11-
A scroll has the following layout
12+
## Quick Reference
1213

13-
- **scroll.yaml**
14-
- [Scroll manifest file](#scrollyaml)
15-
- init-files (optional)
16-
- Files that should be copied into the working directory. **Templates will be rendered out.**
17-
- init-files-template (optional)
18-
- Files that should be copied into the working directory. **Templates will NOT be rendered out.**
19-
- scroll-switch (optional)
20-
- directory for files related to scroll switches.
21-
- update (optional)
22-
- directory for files related to scroll updates.
14+
### Structure
2315

24-
## Publishing Scrolls
25-
26-
To publish a scroll you can run `druid push ./scroll-dir`, where ./scroll-dir should include at least a scroll.yaml.
27-
You can also just run `druid push`.
28-
In this case it is asumed that a scroll.yaml is in the current working directory.
29-
30-
## scroll.yaml
31-
32-
The scroll.yaml is the most important file in a scroll. It is the only manditory file.
33-
34-
Here is an example:
35-
36-
```yaml
37-
name: registry-1.docker.io/highcard/scroll-minecraft-cuberite
38-
desc: Minecraft Cuberite
39-
version: 0.0.1
40-
app_version: latest
41-
init: "main.start"
42-
processes:
43-
main:
44-
commands:
45-
start:
46-
needs: [main.install]
47-
run: restart
48-
procedures:
49-
- mode: exec
50-
data:
51-
- bash
52-
- ./start.sh
53-
stop:
54-
procedures:
55-
- mode: stdin
56-
data:
57-
- main.start
58-
- stop
59-
install:
60-
run: once
61-
procedures:
62-
- mode: exec
63-
data:
64-
- wget
65-
- -q
66-
- -O
67-
- Cuberite.tar.gz
68-
- https://download.cuberite.org/linux-x86_64/Cuberite.tar.gz
69-
- mode: exec
70-
data:
71-
- tar
72-
- -xzf
73-
- Cuberite.tar.gz
74-
update:
75-
procedures:
76-
- mode: exec
77-
data:
78-
- sh
79-
- $SCROLL_DIR/update.sh
16+
```
17+
scroll-dir/
18+
├── scroll.yaml # Manifest
19+
├── start.sh # Scripts
20+
└── packet_handler/ # ColdStarter handlers
8021
```
8122

82-
### name
83-
84-
Name if the Scroll
85-
86-
### desc
87-
88-
Description of the scroll
89-
90-
### version
91-
92-
Version of the Scroll.
93-
94-
### app_version
95-
96-
Version of the App. NOT VERSION OF THE SCROLL. E.g if you run mysql 8.0, version should be 8.0 aswell.
97-
98-
### init
23+
### Commands
9924

100-
Command wich should be run on first startup.
25+
```bash
26+
# Validate scroll
27+
druid scroll validate
10128

102-
### processes
29+
# Run scroll
30+
druid serve
10331

104-
Key value list of commands to run. The convention is to handle the main logic in a process called `main`.
32+
# Run specific command
33+
druid run <command>
34+
```
10535

106-
### processes.commands
36+
### Publishing
10737

108-
Key value list of available commands. A command has the following layout:
38+
```bash
39+
druid registry login
40+
druid registry push
41+
```
10942

110-
- **needs**
111-
- an array of commands wich need to be run before the command accually starts.
112-
- **run:** available options always (default), restart or once
43+
---
11344

114-
### processes.commands.procedures
45+
For complete scroll.yaml format, field reference, examples, and ColdStarter configuration, see:
11546

116-
- **procedures:** list of commands to run.
117-
- **mode**
118-
- **exec**: run process
119-
- **exec_tty**: run process in tty mode
120-
- **stdin**: send data to stdin of a certain process
121-
- different values are also possible [if you used a plugin](plugins).
122-
- **data:** array with informations, depending on mode
47+
**[Scroll System Documentation](../scrolls/introduction.md)**

0 commit comments

Comments
 (0)