diff --git a/docs/content/faq.md b/docs/content/faq.md index 7fd0cd12..b2430530 100644 --- a/docs/content/faq.md +++ b/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 ``` diff --git a/docs/content/guides/cli.md b/docs/content/guides/cli.md new file mode 100644 index 00000000..d952f92a --- /dev/null +++ b/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 +``` + +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. diff --git a/package.json b/package.json index 7276960f..f342dc1d 100644 --- a/package.json +++ b/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", diff --git a/src/nuxt.config.ts b/src/nuxt.config.ts index a91578d2..e07cad71 100644 --- a/src/nuxt.config.ts +++ b/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)