Skip to content

Commit 784e411

Browse files
Openblocks-docsgitbook-bot
Openblocks-docs
authored andcommitted
GitBook: [lowcoder-org#72] edit docs: "Self-hosting"
1 parent 780a325 commit 784e411

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed
68.4 KB
Loading

docs/self-hosting/README.md

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,49 @@ docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks"
5757
{% endtab %}
5858
{% endtabs %}
5959

60-
{% hint style="info" %}
61-
By default the supervisor will run under the user <mark style="background-color:yellow;">`uid=9001`</mark>. You can specify the uid by adding a docker environment variable <mark style="background-color:yellow;">`LOCAL_USER_ID`</mark> and setting its value.
60+
### Run as non-root user
6261

63-
* Docker-compose: Add an environment variable <mark style="background-color:yellow;">`LOCAL_USER_ID`</mark> in <mark style="background-color:yellow;">`docker-compose.yml`</mark> downloaded in your working directory.\
64-
![](../.gitbook/assets/local-user-id.png)\
65-
After modifying the YML file, you may need to delete your current container and start a new one.\
62+
By default the supervisor will run under the user `uid=9001`. You can specify the uid by adding a docker environment variable `LOCAL_USER_ID` and setting its value.
6663

67-
* Docker: Add an environment variable <mark style="background-color:yellow;">`LOCAL_USER_ID`</mark> to the deploying command, as shown below:\
68-
<mark style="background-color:yellow;">`docker run -d --name openblocks -e LOCAL_USER_ID = YOUR_USER_ID -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ce`</mark>
69-
{% endhint %}
64+
{% tabs %}
65+
{% tab title="Docker-Compose" %}
66+
Add an environment variable `LOCAL_USER_ID` in `docker-compose.yml` downloaded in your working directory.\
67+
<img src="../.gitbook/assets/local-user-id.png" alt="" data-size="original">
68+
{% endtab %}
69+
70+
{% tab title="Docker" %}
71+
Add an environment variable `LOCAL_USER_ID` to the deploying command, as shown below:
72+
73+
{% code overflow="wrap" %}
74+
```docker
75+
docker run -d --name openblocks -e LOCAL_USER_ID = YOUR_USER_ID -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ce
76+
```
77+
{% endcode %}
78+
{% endtab %}
79+
{% endtabs %}
80+
81+
### Install SSL certificate
82+
83+
With an SSL certificate, you can securely visit self-hosted Openblocks with HTTPS protocol. Here are the steps to install your SSL certificate before starting a container:
84+
85+
{% tabs %}
86+
{% tab title="Docker-Compose" %}
87+
1. Copy `fullchain.pem` and `privkey.pem` to the `$PWD/stacks/ssl` directory.
88+
2. In `$PWD/docker-compose.yml`, change the value of `ports` to `"3443:3443"`.\
89+
![](../.gitbook/assets/ssl-certificates.png)
90+
{% endtab %}
91+
92+
{% tab title="Docker" %}
93+
1. Copy `fullchain.pem` and `privkey.pem` to the `$PWD/stacks/ssl` directory.
94+
2. Change the `ports` of the deploying command to `3443:3443`, as shown below:
95+
96+
{% code overflow="wrap" %}
97+
```
98+
docker run -d --name openblocks -p 3443:3443 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ce
99+
```
100+
{% endcode %}
101+
{% endtab %}
102+
{% endtabs %}
70103

71104
## Update
72105

0 commit comments

Comments
 (0)