File tree Expand file tree Collapse file tree 5 files changed +47
-35
lines changed Expand file tree Collapse file tree 5 files changed +47
-35
lines changed Original file line number Diff line number Diff line change 1
1
setup :
2
2
@docker build --progress=plain -f Containerfile -t mermerd .
3
3
4
+ run : STORAGE_DIRECTORY = "$(CURDIR ) /storage/"
4
5
run :
5
- @touch output.mmd
6
- @docker run --rm -it --net host \
7
- --mount type=bind,source=" $( CURDIR) " /examples/mermerd-config.yaml,target=/root/.mermerd \
8
- --mount type=bind,source=" $( CURDIR) " /output.mmd,target=/root/result.mmd \
6
+ @docker run --rm -it \
7
+ --net host \
8
+ -v " $( STORAGE_DIRECTORY) :/mnt/storage/" \
9
9
mermerd \
10
- --runConfig " /root/. mermerd" \
10
+ --runConfig " /etc/ mermerd/config.yml " \
11
11
--connectionString " mysql://root:@tcp(host.docker.internal:3306)/mysql"
12
12
13
13
test :
14
- @$(MAKE ) setup
15
- @tests/index.sh
14
+ @$(CURDIR ) /tests/index.sh
Original file line number Diff line number Diff line change 1
- # [ mermerd-container] ( https://github.com/nedix/mermerd-container )
1
+ # [ mermerd-container] [ project ]
2
2
3
3
Create [ Mermaid] ERD diagrams from live databases.
4
4
5
- ## Usage
6
-
7
- #### 1. Create an output file
8
-
9
- ``` shell
10
- touch output.mmd
11
- ```
12
5
13
- #### 2. (Optional) Create a mermerd configuration file
6
+ ## Usage
14
7
15
- See
16
- [ documentation] ( https://github.com/KarnerTh/mermerd?tab=readme-ov-file#global-configuration-file )
17
- and
18
- [ examples/mermerd-config.yaml] ( https://github.com/nedix/mermerd-container/blob/main/examples/mermerd-config.yaml )
19
- .
20
8
21
- #### 3. Run the mermerd command-line interface
9
+ ### 3. Run the mermerd command-line utility
22
10
23
11
This example command connects to a MySQL server running on localhost port 3306.
24
12
Replace ` root: ` with your ` username:password ` combination.
25
13
26
14
``` shell
27
- docker run --pull always --rm -it --name mermerd \
15
+ docker run --rm -it --pull always --name mermerd \
28
16
--net host \
29
- --mount type=bind,source= " ${PWD} " /output.mmd,target=/root/result.mmd \
30
- --mount type=bind,source= " ${PWD} " / mermerd-config.yaml,target=/root/.mermerd \ # optional
31
- nedix/ mermerd \
17
+ -v " ${PWD} /storage/:/mnt/storage/ " \
18
+ mermerd \
19
+ --runConfig " /etc/ mermerd/config.yml " \
32
20
--connectionString " mysql://root:@tcp(host.docker.internal:3306)/mysql"
33
21
```
34
22
35
- <hr >
36
-
37
- ## Attribution
38
-
39
- Powered by [ mermerd] .
40
23
41
- [ mermaid ] : https://mermaid.js.org
42
- [ mermerd ] : https://github.com/KarnerTh/mermerd
24
+ [ project ] : https://hub.docker.com/r/nedix/mermerd
Original file line number Diff line number Diff line change
1
+ # Make
2
+
3
+ ## Available commands
4
+
5
+ ### Setup
6
+
7
+ Build the container.
8
+
9
+ Command: ` make setup `
10
+
11
+
12
+ ### Run
13
+
14
+ Start the container.
15
+
16
+ Command: ` make run `
17
+
18
+ Options:
19
+
20
+ | Option key | Default value |
21
+ | ---------------------| ----------------------------|
22
+ | STORAGE_DIRECTORY | ./storage/ |
23
+
24
+
25
+ ### Test
26
+
27
+ Run all tests.
28
+
29
+ Command: ` make test `
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ omitAttributeKeys: true
10
10
# omit the constraint labels
11
11
omitConstraintLabels : true
12
12
13
- # output file name (default "result.mmd")
14
- outputFileName : " result .mmd"
13
+ # output file name
14
+ outputFileName : " /mnt/storage/output .mmd"
15
15
16
16
# schema that should be used
17
17
schema :
Original file line number Diff line number Diff line change
1
+ *
2
+ ! .gitignore
You can’t perform that action at this time.
0 commit comments