@@ -20,16 +20,15 @@ To do this, go to your domain registrar's control panel and add a new nameserver
20
20
name ` ns.<DOMAIN> ` and the IP address ` <PUBLIC_IP> ` , then add an ` NS ` record for your ` <DOMAIN> ` pointing to
21
21
the created nameserver, i.e. ` ns.<DOMAIN> ` .
22
22
23
-
24
23
::: info
25
24
26
25
Let's say you have the domain ` example.com ` and a server with the public IP address ` 123.123.123.123 ` .
27
26
In the registrar's control panel you must add a new nameserver ` ns.example.com ` with IP address ` 123.123.123.123 ` .
28
27
Then, you need to add an ` NS ` record for ` example.com ` :
29
28
30
- | example.com | record type | value |
31
- | - | - | - |
32
- | @ | NS | ns.example.com |
29
+ | example.com | record type | value |
30
+ | ----------- | ----------- | ------------- - |
31
+ | @ | NS | ns.example.com |
33
32
34
33
:::
35
34
@@ -43,7 +42,6 @@ $ host -t a ns.<DOMAIN>
43
42
ns.<DOMAIN> has address <PUBLIC_IP>
44
43
```
45
44
46
-
47
45
## Docker compose
48
46
49
47
The recommended way to install the Sonar backend on your server is to use a Docker Compose file.
@@ -55,15 +53,15 @@ services:
55
53
restart : always
56
54
image : ghcr.io/nt0xa/sonar:1
57
55
ports :
58
- - 21:21 # FTP
59
- - 25:25 # SMTP
60
- - 53:53/udp # DNS
61
- - 80:80 # HTTP
62
- - 443:443 # HTTPS
56
+ - 21:21 # FTP
57
+ - 25:25 # SMTP
58
+ - 53:53/udp # DNS
59
+ - 80:80 # HTTP
60
+ - 443:443 # HTTPS
63
61
- 31337:31337 # REST API
64
- - 31338:31338 # Webhooks (currently only used by Lark messenger)
62
+ - 31338:31338 # Webhooks (currently only used by Lark messenger in "webhook" mode )
65
63
volumes :
66
- - ./tls:/opt/app/tls # TLS certificates persistance
64
+ - ./tls:/opt/app/tls # TLS certificates persistance
67
65
- ./config.yml:/opt/app/config.yml # Config file: see "Configuration"
68
66
69
67
db :
@@ -81,7 +79,7 @@ services:
81
79
82
80
To configure the Sonar backend create a ` config.toml` file in the same directory as the `docker-compose.yml` file.
83
81
84
- ` ` ` toml title="config.toml"
82
+ ` ` ` toml title="config.toml"
85
83
# Your server public IP address.
86
84
ip = "<PUBLIC_IP>"
87
85
@@ -132,7 +130,7 @@ admin = "<TOKEN>"
132
130
# Telegram configuration.
133
131
[modules.telegram]
134
132
# Admin user Telegram ID. Use @getmyid_bot to get yours.
135
- admin = <USER_ID>
133
+ admin = " <USER_ID>"
136
134
# Bot token. Use @BotFather bot to get one.
137
135
token = "<BOT_TOKEN>"
138
136
@@ -143,7 +141,11 @@ admin = "<ADMIN_ID>"
143
141
app_id = "<APP_ID>"
144
142
# App Secret. You can find it on the "Credentials & Basic Info" page of your app.
145
143
app_secret = "<APP_SECRET>"
146
- # Verification token. You can find it on the "Events & callbacks" page of your app
144
+ # Mode. There are two moded supported "webhook" (default) and "websocket".
145
+ # See https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/server-side-sdk/golang-sdk-guide/handle-events
146
+ # for more information.
147
+ mode = "webhook"
148
+ # Verification token. Required only for "webhook" mode. You can find it on the "Events & callbacks" page of your app
147
149
# under the "Encryption strategy" tab.
148
150
verification_token = "<VERIFICATION_TOKEN>"
149
151
```
0 commit comments