Skip to content

Commit a6bc578

Browse files
YoJayzgitbook-bot
authored andcommitted
GitBook: [#52] edit doc: 'Self-hosting'
1 parent 81333a0 commit a6bc578

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

‎docs/self-hosting/README.md

+22-18
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ mkdir openblocks
2222
cd openblocks
2323
```
2424

25-
## Docker-Compose (Recommend)
26-
27-
### Deploy
25+
## Deploy
2826

27+
{% tabs %}
28+
{% tab title="Docker-Compose (Recommend)" %}
2929
Follow the steps below:
3030

3131
1. Download the configuration file by clicking [docker-compose.yml](https://cdn-files.openblocks.dev/docker-compose.yml) or running the curl command: `curl https://cdn-files.openblocks.dev/docker-compose.yml -o $PWD/docker-compose.yml`
@@ -40,31 +40,33 @@ Follow the steps below:
4040

4141

4242
<figure><img src="../.gitbook/assets/check-logs-ce.png" alt=""><figcaption></figcaption></figure>
43+
{% endtab %}
4344

44-
### Update
45-
46-
Run the following commands to update to the latest Openblocks image:
45+
{% tab title="Docker" %}
46+
Run the command below:
4747

48+
{% code overflow="wrap" %}
4849
```powershell
49-
docker-compose pull
50-
docker-compose rm -fsv openblocks
51-
docker-compose up -d
50+
docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ce
5251
```
52+
{% endcode %}
53+
{% endtab %}
54+
{% endtabs %}
5355

54-
## Docker
55-
56-
### Deploy
56+
## Update
5757

58-
Run this command to deploy Openblocks on premise:
58+
{% tabs %}
59+
{% tab title="Docker-Compose" %}
60+
Run the following commands to update to the latest Openblocks image:
5961

60-
{% code overflow="wrap" %}
6162
```powershell
62-
docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ce
63+
docker-compose pull
64+
docker-compose rm -fsv openblocks
65+
docker-compose up -d
6366
```
64-
{% endcode %}
65-
66-
### Update
67+
{% endtab %}
6768

69+
{% tab title="Docker" %}
6870
Run the following commands to update to the latest Openblocks image:
6971

7072
{% code overflow="wrap" %}
@@ -74,6 +76,8 @@ docker rm -fv openblocks
7476
docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ce
7577
```
7678
{% endcode %}
79+
{% endtab %}
80+
{% endtabs %}
7781

7882
## Sign up
7983

‎docs/self-hosting/access-local-database-or-api.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ Assume that a Postgres service is ready on your local host with port `5432`. Con
2626
{% hint style="warning" %}
2727
On some OS (such as Ubuntu), port access might be blocked by the firewall. To solve that, configure in the following steps:
2828

29-
1. Stop the firewall from blocking access from **docker0** by typing in the terminal:\
30-
<mark style="background-color:yellow;">**`iptables -A INPUT -p tcp -i docker0 --dport YOUR_DB_PORT -j ACCEPT`**</mark>\
29+
1. Stop the firewall from blocking access from <mark style="background-color:yellow;">**`docker0`**</mark> by typing in the terminal:\ <mark style="background-color:blue;"></mark><mark style="background-color:yellow;">**`iptables -A INPUT -p tcp -i docker0 --dport YOUR_DB_PORT -j ACCEPT`**</mark>\
3130
`Note: In this case`Here we use Postgres port <mark style="background-color:yellow;">**`5432`**</mark> for <mark style="background-color:yellow;">**`YOUR_DB_PORT`**</mark>, and you should replace it with your own.
3231
2. Save the firewall configuration by typing in the terminal:\
3332
<mark style="background-color:yellow;">**`iptables-save > /etc/iptables.up.rules`**</mark>
@@ -48,8 +47,3 @@ In Openblocks, configure the Postgres data source as the following figure shows:
4847
<figure><img src="../.gitbook/assets/access-local-win-mac.png" alt=""><figcaption></figcaption></figure>
4948
{% endtab %}
5049
{% endtabs %}
51-
52-
53-
54-
55-

0 commit comments

Comments
 (0)