Update mgmt binary name and config doc (#75)

* using wiretrustee-mgmt for binary name

* using wiretrustee-mgmt

* updated documentation and compose files to use config.json
This commit is contained in:
Maycon Santos 2021-07-31 12:33:04 +02:00 committed by GitHub
parent f51a79d3b3
commit ea99def502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 7 deletions

View File

@ -24,7 +24,7 @@ builds:
- id: wiretrustee-mgmt
dir: management
env: [CGO_ENABLED=0]
binary: wiretrustee-mgmt
goos:
- linux
goarch:

View File

@ -0,0 +1,24 @@
{
"Stuns": [
{
"Proto": "udp",
"URI": "stun:stun.wiretrustee.com:3468",
"Username": "",
"Password": null
}
],
"Turns": [
{
"Proto": "udp",
"URI": "turn:stun.wiretrustee.com:3468",
"Username": "some_turn_user",
"Password": "some_turn_passwd"
}
],
"Signal": {
"Proto": "http",
"URI": "signal.wiretrustee.com:10000",
"Username": "",
"Password": null
}
}

View File

@ -12,6 +12,7 @@ services:
restart: unless-stopped
volumes:
- wiretrustee-mgmt:/var/lib/wiretrustee
- ./config.json:/etc/wiretrustee/config.json
ports:
- 33073:33073
# # port and command for Let's Encrypt validation

View File

@ -1,3 +1,3 @@
FROM gcr.io/distroless/base
ENTRYPOINT [ "/go/bin/wiretrustee","management"]
COPY wiretrustee /go/bin/wiretrustee
ENTRYPOINT [ "/go/bin/wiretrustee-mgmt","management"]
COPY wiretrustee-mgmt /go/bin/wiretrustee-mgmt

View File

@ -1,3 +1,3 @@
FROM gcr.io/distroless/base:debug
ENTRYPOINT [ "/go/bin/wiretrustee","management","--log-level","debug"]
COPY wiretrustee /go/bin/wiretrustee
ENTRYPOINT [ "/go/bin/wiretrustee-mgmt","management","--log-level","debug"]
COPY wiretrustee-mgmt /go/bin/wiretrustee-mgmt

View File

@ -7,7 +7,7 @@ The CLI accepts the command **management** with the following options:
start Wiretrustee Management Server
Usage:
wiretrustee management [flags]
wiretrustee-mgmt management [flags]
Flags:
--datadir string server data directory location (default "/var/lib/wiretrustee/")
@ -39,9 +39,11 @@ docker run -d --name wiretrustee-management \
-p 33073:33073 \
-p 443:443 \
-v wiretrustee-mgmt:/var/lib/wiretrustee \
-v ./config.json:/etc/wiretrustee/config.json \
wiretrustee/management:latest \
--letsencrypt-domain <YOUR-DOMAIN>
```
> An example of config.json can be found here [config.json](../infrastructure_files/config.json)
Trigger Let's encrypt certificate generation:
```bash
@ -76,6 +78,7 @@ docker volume create wiretrustee-mgmt
docker run -d --name wiretrustee-management \
-p 33073:33073 \
-v wiretrustee-mgmt:/var/lib/wiretrustee \
-v ./config.json:/etc/wiretrustee/config.json \
wiretrustee/management:latest
```
### Debug tag
@ -84,6 +87,7 @@ We also publish a docker image with the debug tag which has the log-level set to
shell $ docker run -d --name wiretrustee-management-debug \
-p 33073:33073 \
-v wiretrustee-mgmt:/var/lib/wiretrustee \
-v ./config.json:/etc/wiretrustee/config.json \
wiretrustee/management:debug-latest
shell $ docker exec -ti wiretrustee-management-debug /bin/sh

View File

@ -21,7 +21,7 @@ var (
logLevel string
rootCmd = &cobra.Command{
Use: "wiretrustee",
Use: "wiretrustee-mgmt",
Short: "",
Long: "",
}