from flask import Flask


app = Flask(__name__)


@app.route('/')
def index():
    return 'Hello Docker + Nginx + Gunicorn + Flask!'


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

from flask import Flask


app = Flask(__name__)


@app.route('/')
def index():
    return 'Hello Docker + Nginx + Gunicorn + Flask!'

Remove __name__ == __main__ becuase it'll never be used