Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: modify run pika in docker readme #2743

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,21 @@ Users can directly download the latest binary version package from [releases](ht

* #### 3.1 Running with Docker

```bash
Modify the following configuration items of conf/pika.conf file:
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify the language for the code block to enhance readability and syntax highlighting.

-```
+```properties
 log-path : /data/log/
 db-path : /data/db/
 db-sync-path : /data/dbsync/
 dump-path : /data/dump/

Specifying the language as properties for the configuration snippet will help in syntax highlighting and improve the readability of the documentation.

Tools
Markdownlint

256-256: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


256-256: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified

log-path : /data/log/
db-path : /data/db/
db-sync-path : /data/dbsync/
dump-path : /data/dump/
```

And then execute the following statement to start pika in docker:
```bash
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line before the code block for proper markdown formatting.

-  And then execute the following statement to start pika in docker:
+  And then execute the following statement to start pika in docker:

  ```bash

A blank line before the code block will ensure it is properly formatted in markdown viewers.

Tools
Markdownlint

264-264: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines

docker run -d \
--restart=always \
-p 9221:9221 \
-v <log_dir>:/pika/log \
-v <db_dir>:/pika/db \
-v <dump_dir>:/pika/dump \
-v <dbsync_dir>:/pika/dbsync \
-v "$(pwd)/conf":"/pika/conf" \
-v "/tmp/pika-data":"/data" \
Comment on lines +264 to +269
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure consistent formatting in Docker run commands.

-    -v "$(pwd)/conf":"/pika/conf" \
-    -v "/tmp/pika-data":"/data" \
+    -v "$(pwd)/conf:/pika/conf" \
+    -v "/tmp/pika-data:/data" \

The volume mappings in the Docker command should not have spaces around the colon to ensure consistency and avoid potential issues in different environments or shells.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```bash
docker run -d \
--restart=always \
-p 9221:9221 \
-v <log_dir>:/pika/log \
-v <db_dir>:/pika/db \
-v <dump_dir>:/pika/dump \
-v <dbsync_dir>:/pika/dbsync \
-v "$(pwd)/conf":"/pika/conf" \
-v "/tmp/pika-data":"/data" \
```bash
docker run -d \
--restart=always \
-p 9221:9221 \
-v "$(pwd)/conf:/pika/conf" \
-v "/tmp/pika-data:/data" \
Tools
Markdownlint

264-264: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines

pikadb/pika:v3.3.6

redis-cli -p 9221 "info"
Expand Down
Loading