Repository: provectus/kafka-ui
Issue: How to enable read only mode?

Hi All,

How to enable real only mode in docker?
Based on #218 PR it is enable with `readOnly` environment variable.

In docker I have tried the following configuration:
```
-e readOnly=True
-e readOnly=true
-e readOnly='True'
-e readOnly='true'
-e KAFKA_CLUSTERS_0_READONLY=true
-e KAFKA_CLUSTERS_0_READONLY=True
``` 

In every cases "Add topic" and "edit setting" button on the UI was still active. When I click on these buttons I dont get any error message. In the "edit settings" menu when I click on the "submit" button I got no error message. 


Thanks,
Andor


Issue comments:
Hi, @andormarkus 

```-e KAFKA_CLUSTERS_0_READONLY=true``` should work for backend in version 0.0.10, frontend will be released in next version.
Hi @germanosin 

I have adjusted the documentation according it. See my PR #247 

Thanks,
Andor

Pull request review comments:

Patch that resolved the issue:
diff --git a/README.md b/README.md
index 4e38d7bec88..84521839aba 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,8 @@ docker run -p 8080:8080 \
 	-d provectuslabs/kafka-ui:latest 
 
 ```
-Then access the web UI at [http://localhost:8080](http://localhost:8080).
+Then access the web UI at [http://localhost:8080](http://localhost:8080).  
+Further configuration with environment variables - [see environment variables](#env_variables)  
  
 ### Docker Compose
 
@@ -138,10 +139,11 @@ kafka:
 * `schemaRegistry`: schemaRegistry's address
 * `schemaNameTemplate`: how keys are saved to schemaRegistry
 * `jmxPort`: open jmxPosrts of a broker
+* `readOnly`: enable read only mode
 
 Configure as many clusters as you need by adding their configs below separated with `-`.
 
-## Environment Variables
+## <a name="env_variables"></a> Environment Variables
 
 Alternatively, each variable of of the .yml file can be set with an environment variable. 
 For example, if you want to use an environment variable to set the `name` parameter, you can write it like this: `KAFKA_CLUSTERS_2_NAME`
@@ -154,6 +156,7 @@ For example, if you want to use an environment variable to set the `name` parame
 |`KAFKA_CLUSTERS_0_SCHEMAREGISTRY`   	|SchemaRegistry's address
 |`KAFKA_CLUSTERS_0_SCHEMANAMETEMPLATE`  |How keys are saved to schemaRegistry
 |`KAFKA_CLUSTERS_0_JMXPORT`        	|Open jmxPosrts of a broker
+|`KAFKA_CLUSTERS_0_READONLY`        	|Enable read only mode. Default: false
 
  
 
diff --git a/docker-compose.md b/docker-compose.md
index 1ec8b135045..68be207ade4 100644
--- a/docker-compose.md
+++ b/docker-compose.md
@@ -1,5 +1,7 @@
 # Quick Start with docker-compose
 
+Envinronment variables documentation - [see usage](README.md#env_variables) 
+
 * Add a new service in docker-compose.yml
 
 ```yaml
@@ -9,14 +11,31 @@ services:
     image: provectuslabs/kafka-ui
     container_name: kafka-ui
     ports:
-      - "9000:8080"
+      - "8080:8080"
     restart: always
     environment:
-      -e KAFKA_CLUSTERS_0_NAME=local
-      -e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
-      -e KAFKA_CLUSTERS_0_ZOOKEEPER=localhost:2181
+      - KAFKA_CLUSTERS_0_NAME=local
+      - KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
+      - KAFKA_CLUSTERS_0_ZOOKEEPER=localhost:2181
 ```
+
+* If you prefer Kafka UI in read only mode
    
+```yaml
+version: '2'
+services:
+  kafka-ui:
+    image: provectuslabs/kafka-ui
+    container_name: kafka-ui
+    ports:
+      - "8080:8080"
+    restart: always
+    environment:
+      - KAFKA_CLUSTERS_0_NAME=local
+      - KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
+      - KAFKA_CLUSTERS_0_ZOOKEEPER=localhost:2181
+      - KAFKA_CLUSTERS_0_READONLY=true
+```
   
 * Start Kafka UI process
 


Test patch: