将Redash集成到Docker容器中

将Redash集成到Docker容器中,docker,docker-compose,redash,Docker,Docker Compose,Redash,问题: 在我的Docker中安装Redash 使Redash图表在Docker中运行的我的应用程序中可用 测试容器,它基本上删除了问题中的任何第三方因素,只运行一个用于演示的Flask应用程序 app.py from flask import Flask import os import socket app = Flask(__name__) @app.route("/") def hello(): html = "<h3>Hello World!</h3>

问题

  • 在我的Docker中安装Redash
  • 使Redash图表在Docker中运行的我的应用程序中可用

  • 测试容器,它基本上删除了问题中的任何第三方因素,只运行一个用于演示的Flask应用程序

    app.py

    from flask import Flask
    import os
    import socket
    
    app = Flask(__name__)
    
    @app.route("/")
    def hello():
        html = "<h3>Hello World!</h3>"
        return html
    
    if __name__ == "__main__":
        app.run(host='0.0.0.0', port=80)
    
    docker撰写yaml

    version: '3' 
    services: 
        redash: 
            image: redash/redash 
            ports: 
                - "5001:5000" 
        test: 
            build: .
            ports: 
                - "80:80"
    
    完整日志:

    $ docker-compose up
    Starting test1_redash_1 ... done
    Recreating test1_test_1 ... done
    Attaching to test1_redash_1, test1_test_1
    test1_redash_1 exited with code 0
    test_1    |  * Serving Flask app "app" (lazy loading)
    test_1    |  * Environment: production
    test_1    |    WARNING: Do not use the development server in a production environment.
    test_1    |    Use a production WSGI server instead.
    test_1    |  * Debug mode: off
    test_1    |  * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
    test_1    | 192.168.0.1 - - [13/Jul/2018 03:53:08] "GET / HTTP/1.1" 200 -
    
    redash的Dockerhub链接



    我做错了什么?

    您能发布完整的Docker Compose YAML文件以及容器的实际输出吗?所有这些信息都表明redash容器退出了,这几乎可能有任何原因。好吧,我将在不使用现有应用程序的情况下创建一个全新的容器,并发布日志。在这个更新中,您创建的图像不做任何事(
    来自ubuntu
    ,没有
    CMD
    );“退出代码为0”表示它没有成功执行任何操作。我觉得你把这件事简化了一点。他们的文件很差。我必须添加
    redis
    postgres
    、和
    worker
    容器才能让它工作
    $ docker-compose up
    Starting test1_redash_1 ... done
    Recreating test1_test_1 ... done
    Attaching to test1_redash_1, test1_test_1
    test1_redash_1 exited with code 0
    test_1    |  * Serving Flask app "app" (lazy loading)
    test_1    |  * Environment: production
    test_1    |    WARNING: Do not use the development server in a production environment.
    test_1    |    Use a production WSGI server instead.
    test_1    |  * Debug mode: off
    test_1    |  * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
    test_1    | 192.168.0.1 - - [13/Jul/2018 03:53:08] "GET / HTTP/1.1" 200 -