Skip to content

Commit

Permalink
apply markdownlint and dockerlint suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jan 13, 2025
1 parent 434acea commit 48c28c3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WORKDIR /opt/node_app

COPY package.json package-lock.json* ./
RUN npm install --verbose --include=dev && npm cache clean --force
ENV PATH /opt/node_app/node_modules/.bin:$PATH
ENV PATH=/opt/node_app/node_modules/.bin:$PATH

HEALTHCHECK --interval=30s CMD node healthcheck.js

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/usr/bin/make -f

PWD=$(shell pwd)
DOCKERRUN=docker run \
--rm -it \
-p 5173:5173 \
--name=naemon-docs \
-v `pwd`:/opt/node_app/app \
-v $(PWD):/opt/node_app/app \
-v /opt/node_app/node_modules/ \
-v /opt/node_app/app/.vitepress/cache \
-v /opt/node_app/app/.vitepress/dist \
-v `pwd`/package.json:/opt/node_app/package.json \
-v $(PWD)/package.json:/opt/node_app/package.json \
naemon/docs:latest

docker-build:
Expand Down
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ To do so, all old files got moved into the `legacy` folder using `git mv`. This
To migrate a page from Jekyll to VitePress, you have to use the `git mv` command, to move the file from the `legacy` folder into the
new VitePress project located in `src`.

```
```sh
git mv legacy/documentation/usersguide/config-incompat3to4.md src/documentation/usersguide/
```

In the next step, edit the file, apply all the required changes and command your work.


## Run development server

Please see the documentation of how to setup a local copy of the Naemon website.

[Run Naemon Website Locally ](./documentation/developer/website.md)
[Run Naemon Website Locally](./documentation/developer/website.md)

### In a nutshell
```

```sh
git clone https://github.com/naemon/naemon.github.io.git
cd naemon.github.io/

Expand All @@ -39,18 +39,29 @@ npm run docs:dev
```

### Using Docker

In case you do not want to install Nodejs to your system, you can also use Docker

First build the Docker image which will contain N Nodejs - thats all this documentation has no dependencies
```

```sh
docker build . -t naemon/docs
```

Now run the Docker container and navigate to `http://127.0.0.1:5173` in your browser.
The container watches for file changes and will automatically regenerate the website if needed.

```
docker run --rm -it -v "$PWD":/site -p "5173:5173" naemon/docs:latest
```sh
docker run \
--rm -it \
-p 5173:5173 \
--name=naemon-docs \
-v $PWD:/opt/node_app/app \
-v /opt/node_app/node_modules/ \
-v /opt/node_app/app/.vitepress/cache \
-v /opt/node_app/app/.vitepress/dist \
-v $PWD/package.json:/opt/node_app/package.json \
naemon/docs:latest
```

### Important for the Migration
Expand All @@ -60,7 +71,6 @@ docker run --rm -it -v "$PWD":/site -p "5173:5173" naemon/docs:latest
3. You can modify HTML anchors like so: `## What Is Naemon? {#whatis}`
4. Add code blocks `like this` for code instead of quotes 'like so'.


### Goals and Motivation

1. Get a dependency free documentation, (only Nodejs and VitePress) but no GitHub Pages, Jekyll and Ruby anymore.
Expand Down

0 comments on commit 48c28c3

Please sign in to comment.