diff --git a/README.md b/README.md index f20c620..87edb6d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,19 @@ Optional variables to configure MySQL: * **DB_PORT** defaults to *3306*: Port of your MySQL server, 3306 is the MySQL default +###Or more secure by using your own, trusted certificate### +``` +#!bash + +docker run -p 64738:64738 -p 64738:64738/udp -v ./data/:/data -e SSL=true shimun/mumble + +``` + +This requires that you placed your certificate in *./data/ssl/murmur.pem* and your key in the same directory named as *murmur.key* + +Optional variables to configure SSL: + +* **SSL_FILENAME** defaults to *murmur*(ex. above): The name of your certificates in /data/ssl Other variables to configure Mumble: @@ -33,4 +46,4 @@ Other variables to configure Mumble: * **BANDWIDTH** defaults to *72000*: Bandwidth limit for voice data in bit/s -* **SUPW** defaults to *autogenerated*: Password for the superuser account, you can lookup the *autogenerated* one in this containers logs \ No newline at end of file +* **SUPW** defaults to *autogenerated*: Password for the superuser account, you can lookup the *autogenerated* one in this containers logs diff --git a/init.sh b/init.sh index 049681c..f6b325b 100755 --- a/init.sh +++ b/init.sh @@ -30,6 +30,12 @@ if [ ! -e /data/murmur.conf ]; then write_config_if_else "$SERVER_TEXT" 'welcometext' '' write_config_if_else "$REGISTER_NAME" 'registerName' '' write_config_if_else "$BANDWIDTH" 'bandwidth' '' + if [ ! -z "$SSL" ] && [ "$SSL" != "false" ]; then + NAME='murmur' + if [ ! -z "$SSL_FILENAME" ]; then NAME="$SSL_FILENAME"; fi + write_config "sslCert=/data/ssl/$NAME.pem" + write_config "sslKey=/data/ssl/$NAME.key" + fi if [ ! -z "$DATABASE" ] && [ "$DATABASE" == "MYSQL" ]; then if [ ! -z "$DB_NAME" ] && [ ! -z "$DB_HOST" ]; then write_config 'dbdriver' 'QMYSQL'