Skip to content

Commit

Permalink
support OS Tabs (#46)
Browse files Browse the repository at this point in the history
* support OS Tabs

* update Hugo version in GitHub actions
  • Loading branch information
b00f authored Jul 31, 2024
1 parent 8b5c124 commit 84e6a0f
Show file tree
Hide file tree
Showing 26 changed files with 8,360 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
name: HTML proofer
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.121.2
HUGO_VERSION: 0.130.0

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.121.2
HUGO_VERSION: 0.130.0

steps:
- name: Checkout
Expand Down
12 changes: 6 additions & 6 deletions content/get-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ Each node can have different settings and configurations based on its needs and

The config file can find inside the working directory, typically located at:

{{< tabs items="Linux-mac,windows" >}}
{{< tab >}}
{{< os_tabs items="unix,windows" >}}
{{< os_tab >}}

```none
~/pactus/config.toml
```

{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

```none
C:\Users\<USER_NAME>\pactus\config.toml
```

{{< /tab >}}
{{< /tabs >}}
{{< /os_tab >}}
{{< /os_tabs >}}

## Editing Config File

Expand Down
42 changes: 21 additions & 21 deletions content/get-started/pactus-daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ Now you need to create a wallet and setup a working directory for your node.
A working directory is a place where you save blockchain data and wallets.
Open the Terminal and run the following command:

{{< tabs items="Linux-mac,windows" >}}
{{< tab >}}
{{< os_tabs items="unix,windows" >}}
{{< os_tab >}}

```bash
./pactus-daemon init
```

This command creates your wallet and setup the working directory at `~/pactus`.
{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

```powershell
```batch
pactus-daemon.exe init
```

This command creates your wallet and setup the working directory at `C:\Users\<USER_NAME>\pactus`.
{{< /tab >}}
{{< /tabs >}}
{{< /os_tab >}}
{{< /os_tabs >}}

{{< callout type="info" >}}
<b>Working director</b>
Expand Down Expand Up @@ -76,8 +76,8 @@ The config file contains parameters that can customize your node.
If you ever need to restore your node, for instance on a new device,
you can use the `--restore` option followed by your mnemonic:

{{< tabs items="Linux-mac,windows" >}}
{{< tab >}}
{{< os_tabs items="unix,windows" >}}
{{< os_tab >}}

```bash
./pactus-daemon init --restore "<your-mnemonic>"
Expand All @@ -86,38 +86,38 @@ you can use the `--restore` option followed by your mnemonic:
Replace `<your-mnemonic>` with your previously noted mnemonic phrase.
This command will restore your wallet in the `~/pactus` directory.

{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

```powershell
```batch
pactus-daemon.exe init --restore "<your-mnemonic>"
```

Replace `<your-mnemonic>` with your previously noted mnemonic phrase.
This command will restore your wallet in the `C:\Users\<USER_NAME>\pactus` directory.
{{< /tab >}}
{{< /tabs >}}
{{< /os_tab >}}
{{< /os_tabs >}}

## Running the Node

Now you can start the node and sync with the network. Run the following command in the Terminal:

{{< tabs items="Linux-mac,windows" >}}
{{< tab >}}
{{< os_tabs items="unix,windows" >}}
{{< os_tab >}}

```bash
./pactus-daemon start
```

{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

```powershell
```batch
pactus-daemon.exe start
```

{{< /tab >}}
{{< /tabs >}}
{{< /os_tab >}}
{{< /os_tabs >}}

{{< hextra/hero-button text="How to run Pactus with systemd linux?" link="/tutorials/linux-systemd/" >}}

Expand Down
42 changes: 21 additions & 21 deletions content/get-started/pactus-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@ Now you need to create a wallet and setup a working directory for your node.
A working directory is a place where you save blockchain data and wallets.
Open the Terminal and run the following command:

{{< tabs items="Linux-mac,windows" >}}
{{< tab >}}
{{< os_tabs items="unix,windows" >}}
{{< os_tab >}}

```bash
docker run -it --rm -v ~/pactus:/root/pactus pactus/pactus pactus-daemon init
```

This command creates your wallet and setup the working directory at `~/pactus`.

{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

```powershell
```batch
docker run -it --rm -v %USERPROFILE%\pactus:/root/pactus pactus/pactus pactus-daemon init
```

This command creates your wallet and setup the working directory at `C:\Users\<USER_NAME>\pactus`.

{{< /tab >}}
{{< /tabs >}}
{{< /os_tab >}}
{{< /os_tabs >}}

Here's an explanation of the Docker flags:

Expand All @@ -71,22 +71,22 @@ Here's an explanation of the Docker flags:

Now you can start the node and sync with the network. Run the following command in the Terminal:

{{< tabs items="Linux-mac,windows" >}}
{{< tab >}}
{{< os_tabs items="unix,windows" >}}
{{< os_tab >}}

```bash
docker run -it -d -v ~/pactus:/root/pactus -p 21888:21888 -p 21888:21888/udp -p 50051:50051 -p 8080:8080 --name pactus pactus/pactus pactus-daemon start --password <WALLET_PASSWORD>
```

{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

```powershell
```batch
docker run -it -d -v %USERPROFILE%\pactus:/root/pactus -p 21888:21888 -p 21888:21888/udp -p 50051:50051 -p 8080:8080 --name pactus pactus/pactus pactus-daemon start --password {WALLET_PASSWORD}
```

{{< /tab >}}
{{< /tabs >}}
{{< /os_tab >}}
{{< /os_tabs >}}

This command creates and runs a Docker container named "pactus".
Here's an explanation of the Docker flags:
Expand Down Expand Up @@ -159,23 +159,23 @@ To enable IPv6 for Docker, follow the official documentation [here](https://docs
You can use Pactus Docker to manage the wallet.
For example, you can check the balance of your wallet as shown below:

{{< tabs items="Linux-mac,windows" >}}
{{< tab >}}
{{< os_tabs items="unix,windows" >}}
{{< os_tab >}}

``` bash
docker run -it --rm -v ~/pactus:/root/pactus pactus/pactus pactus-wallet address all --balance --stake

```

{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

``` powershell
```batch
docker run -it --rm -v %USERPROFILE%\pactus:/root/pactus pactus-wallet address all --balance --stake
```

{{< /tab >}}
{{< /tabs >}}
{{< /os_tab >}}
{{< /os_tabs >}}

## Example docker compose

Expand Down
12 changes: 6 additions & 6 deletions content/get-started/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ reduce your `availability score`, preventing you from receiving rewards.

Therefore, make sure to check that your system or server clock is fully synchronized and that NTP is enabled.

{{< tabs items="Windows,Linux-Mac" >}}
{{< tab >}}
{{< os_tabs items="Windows,Linux-Mac" >}}
{{< os_tab >}}

1. Run `cmd` with run as administrator.
2. Check NTP is enable
Expand Down Expand Up @@ -97,8 +97,8 @@ Source: pool.ntp.org
Poll Interval: 10 (1024s)
```

{{< /tab >}}
{{< tab >}}
{{< /os_tab >}}
{{< os_tab >}}

1. Run `terminal`.
2. Check NTP status by `timedatectl status`
Expand All @@ -124,9 +124,9 @@ If `NTP service` is not active and `System clock synchronized` is no please foll
- <a href="https://groups.google.com/g/public-ntp-discuss/c/VhXAirp-28c" rel="nofollow noindex noreferrer" target="_blank">
How to enable NTP service by systemd-timesyncd</a>

{{< /tab >}}
{{< /os_tab >}}

{{< /tabs >}}
{{< /os_tabs >}}

## Port P2P is open in local machine or server

Expand Down
Loading

0 comments on commit 84e6a0f

Please sign in to comment.