from flask import Flask
from redis import Redis

app = Flask(__name__)
redis = Redis(host= "localhost", port=6379)

@app.route('/')
def hello():
    redis.incr('hits')
    return 'Hello Docker learner! You have seen this page {0} times' . format (redis.get( 'hits' ))

if __name__ == "__main__":
    app.run(host= "0.0.0.0", debug=False)

@@ -89,17 +89,13 @@
 t= %22
-localhost
+redis
 %22, p

Change localhost to redis