From 96aba9f3afa27110399db3748755011d94916aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 1 Apr 2019 14:08:52 +0200 Subject: [PATCH] explicitly enable whisper for mailserver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- _assets/compose/mailserver/Makefile | 7 +++++++ _assets/compose/mailserver/README.md | 4 +++- _assets/compose/mailserver/docker-compose.yml | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/_assets/compose/mailserver/Makefile b/_assets/compose/mailserver/Makefile index 3c7e3ca96..d5ce67b97 100644 --- a/_assets/compose/mailserver/Makefile +++ b/_assets/compose/mailserver/Makefile @@ -14,6 +14,8 @@ export API_MODULES ?= eth,net,web3,admin export CONTAINER_NAME ?= status-go-mailserver export DATA_PATH ?= /var/tmp/status-go-mail export FLEET_NAME ?= eth.beta +export REGISTER_TOPIC ?= whispermail +export MAIL_PASSWORD ?= status-offline-inbox # Necessary to make mailserver available publicly export PUBLIC_IP ?= $(shell curl -s https://ipecho.net/plain) @@ -65,6 +67,11 @@ config: ##@ Generate config for mailserver with current public IP. | jq '.HTTPHost = "0.0.0.0"' \ | jq '.HTTPPort= $(RPC_PORT)' \ | jq '.APIModules = "$(API_MODULES)"' \ + | jq '.RegisterTopics = ["$(REGISTER_TOPIC)"]' \ + | jq '.WhisperConfig.Enabled = true' \ + | jq '.WhisperConfig.EnableMailServer = true' \ + | jq '.WhisperConfig.LightClient = false' \ + | jq '.WhisperConfig.MailServerPassword = "$(MAIL_PASSWORD)"' \ > config.json clean: diff --git a/_assets/compose/mailserver/README.md b/_assets/compose/mailserver/README.md index 4e4bb5a23..8446cf25f 100644 --- a/_assets/compose/mailserver/README.md +++ b/_assets/compose/mailserver/README.md @@ -25,11 +25,13 @@ To simply start a container run `make`, other commands include: All settings are passed through environment variables: * `PUBLIC_IP` - Your IP visible from the internet and advertised by the Mailserver. -* `LISTEN_PORT` - Mailserver TCP port, by default it's `30303` but you might want to use `443`. +* `LISTEN_PORT` - Mailserver TCP & UDP port, by default it's `30303` but you might want to use `443`. * `RPC_PORT` - Control port making it possible to use the [JSON-RPC API](https://github.com/ethereum/wiki/wiki/JSON-RPC). * `API_MODULES` - API modules to be made available via the `RPC_PORT`. * `DATA_PATH` - Location of Mailserver storage and keys. (Default: `/var/tmp/status-go-mail`) * `CONTAINER_NAME` - Name of the container that will be created. +* `REGISTER_TOPIC` - Mynamic mailserver discovery topic. (Default: `whispermail`) +* `MAIL_PASSWORD` - Basic HTTP auth password for mailserver. (Default: `status-offline-inbox`) * `LOG_LEVEL` - Set level of log messages to show. (`ERROR`, `WARN`, `INFO`, `DEBUG`, `TRACE`) # Known Issues diff --git a/_assets/compose/mailserver/docker-compose.yml b/_assets/compose/mailserver/docker-compose.yml index 56e6a974d..8bc64bb7f 100644 --- a/_assets/compose/mailserver/docker-compose.yml +++ b/_assets/compose/mailserver/docker-compose.yml @@ -8,7 +8,8 @@ services: command: -log=${LOG_LEVEL} -log-without-color -c=/config.json -dir=/data ports: - '127.0.0.1:${RPC_PORT}:${RPC_PORT}' - - '0.0.0.0:${LISTEN_PORT}:30303' + - '0.0.0.0:${LISTEN_PORT}:30303/tcp' + - '0.0.0.0:${LISTEN_PORT}:30303/udp' volumes: - '${PWD}/config.json:/config.json' - '${DATA_PATH}:/data'