Browse Source

add docs, include cli packages

pull/1818/head
Bernd Storath 4 months ago
parent
commit
74da360657
  1. 20
      docs/content/faq.md
  2. 43
      docs/content/guides/cli.md
  3. 2
      package.json
  4. 6
      src/nuxt.config.ts

20
docs/content/faq.md

@ -14,13 +14,13 @@ To resolve this issue, you can try the following steps:
1. **Load the WireGuard kernel module**: If the WireGuard kernel module is not loaded, you can load it manually by running:
```bash
```shell
sudo modprobe wireguard
```
2. **Load the WireGuard kernel module on boot**: If you want to ensure that the WireGuard kernel module is loaded automatically on boot, you can add it to the `/etc/modules` file:
```bash
```shell
echo "wireguard" | sudo tee -a /etc/modules
```
@ -32,13 +32,13 @@ To resolve this issue, you can try the following steps:
1. **Load the `nat` kernel module**: If the `nat` kernel module is not loaded, you can load it manually by running:
```bash
```shell
sudo modprobe iptable_nat
```
2. **Load the `nat` kernel module on boot**: If you want to ensure that the `nat` kernel module is loaded automatically on boot, you can add it to the `/etc/modules` file:
```bash
```shell
echo "iptable_nat" | sudo tee -a /etc/modules
```
@ -50,13 +50,13 @@ To resolve this issue, you can try the following steps:
1. **Load the `nat` kernel module**: If the `nat` kernel module is not loaded, you can load it manually by running:
```bash
```shell
sudo modprobe ip6table_nat
```
2. **Load the `nat` kernel module on boot**: If you want to ensure that the `nat` kernel module is loaded automatically on boot, you can add it to the `/etc/modules` file:
```bash
```shell
echo "ip6table_nat" | sudo tee -a /etc/modules
```
@ -68,13 +68,13 @@ To resolve this issue, you can try the following steps:
1. **Load the `filter` kernel module**: If the `filter` kernel module is not loaded, you can load it manually by running:
```bash
```shell
sudo modprobe iptable_filter
```
2. **Load the `filter` kernel module on boot**: If you want to ensure that the `filter` kernel module is loaded automatically on boot, you can add it to the `/etc/modules` file:
```bash
```shell
echo "iptable_filter" | sudo tee -a /etc/modules
```
@ -86,12 +86,12 @@ To resolve this issue, you can try the following steps:
1. **Load the `filter` kernel module**: If the `filter` kernel module is not loaded, you can load it manually by running:
```bash
```shell
sudo modprobe ip6table_filter
```
2. **Load the `filter` kernel module on boot**: If you want to ensure that the `filter` kernel module is loaded automatically on boot, you can add it to the `/etc/modules` file:
```bash
```shell
echo "ip6table_filter" | sudo tee -a /etc/modules
```

43
docs/content/guides/cli.md

@ -0,0 +1,43 @@
---
title: CLI
---
If you want to use the CLI, you can run it with
### Docker Compose
```shell
cd /etc/docker/containers/wg-easy
docker compose run --rm -it wg-easy cli
```
### Docker Run
```shell
docker run --rm -it \
-v ~/.wg-easy:/etc/wireguard \
ghcr.io/wg-easy/wg-easy:15 \
cli
```
### Reset Password
If you want to reset the password for the admin user, you can run the following command:
#### By Prompt
```shell
cd /etc/docker/containers/wg-easy
docker compose run --rm -it wg-easy cli db:admin:reset
```
You are asked to provide the new password
#### By Argument
```shell
cd /etc/docker/containers/wg-easy
docker compose run --rm -it wg-easy cli db:admin:reset --password <new_password>
```
This will reset the password for the admin user to the new password you provided. If you include special characters in the password, make sure to escape them properly.

2
package.json

@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "docker compose -f docker-compose.dev.yml up wg-easy --build",
"cli:dev": "docker compose -f docker-compose.dev.yml run --rm -it wg-easy cli:dev",
"cli:dev": "docker compose -f docker-compose.dev.yml run --build --rm -it wg-easy cli:dev",
"build": "docker build -t wg-easy .",
"docs:preview": "docker run --rm -it -p 8080:8080 -v ./docs:/docs squidfunk/mkdocs-material serve -a 0.0.0.0:8080",
"scripts:version": "bash scripts/version.sh",

6
src/nuxt.config.ts

@ -41,6 +41,9 @@ export default defineNuxtConfig({
detectBrowserLanguage: {
useCookie: true,
},
bundle: {
optimizeTranslationDirective: false,
},
},
nitro: {
esbuild: {
@ -52,6 +55,9 @@ export default defineNuxtConfig({
alias: {
'#db': fileURLToPath(new URL('./server/database/', import.meta.url)),
},
externals: {
traceInclude: [fileURLToPath(new URL('./cli/index.ts', import.meta.url))],
},
},
alias: {
// for typecheck reasons (https://github.com/nuxt/cli/issues/323)

Loading…
Cancel
Save