Question: i have simple `Edittext` and when I'm going to change input letters in im setting listener `new textWatcher` and it's `onTextChanged()` method like:

```
@Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            Log.d("qwer", "onTextChanged: " + s + " " + start + " " + before + " " + count);

            String originalText = s.toString();
            int originalTextLength = originalText.length();
            int currentSelection = textHeading.getSelectionStart();

            StringBuilder sb = new StringBuilder();
            boolean hasChanged = false;
            for (int i = 0; i < originalTextLength; i++) {
                char currentChar = originalText.charAt(i);
                if (isAllowed(currentChar) && i < 21) {
                    sb.append(currentChar);
                } else {
                    hasChanged = true;
                    textHeading.setError("Please insert current letters");
                }
            }
            if (hasChanged) {
                String newText = sb.toString();
                textHeading.setText(capitalize(newText));
                textHeading.setSelection(currentSelection);
            }
        }

```

endless cycle begins when i'm setting validated data back to the edittext becouse it calls method `ontextCahnged()` again. so my goal is dynamically change input letters and i have to capitalize it. I know there is more the easiest way to do it. but i need to do by this way.

Answer: 
I will suggest a few things, let me know which one works for you.

1.As you are exposing port number 5000 (for the front-end and backend), then you should be simply able to communicate using IP address.

* <http://ip_address_of_host_machine:5000>

2.If you decided not to expose port number as security risk then in the docker-compose file you need to link both containers to each other and then by using container names you should be able to communicate.

```
version: '3'
 services:
  module:
   build: .
   ports: 
    - "5000:5000"
   links:
    - module:web
   volumes:
    - "./logs:/logs"
  web:
   build: ./dashboard
  links:
    - web:module
   ports: 
    - "3000:3000"

```

And inside your web docker container, you should be able to access backend using **<http://module:5000>**

**Note** - **module** will work only from inside docker container, if you want to access outside then use host machine ip address.

let me know if you need any help with this?
You need to [EXPOSE](https://docs.docker.com/v17.09/engine/reference/builder/#expose) the port on the module. This will tell it to listen from within Docker (port is from outside, e.g. from your browser) 

```
module:
 build: .
 expose: 
  - "5000"
...etc

```