tiangolo / meinheld-gunicorn-flask-docker

Docker image with Meinheld and Gunicorn for Flask applications in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to pass in 'runserver command' when using app.manager()

nyck33 opened this issue · comments

I have in my main.py:

from flask_script import Server, Manager

then:

app.manager = Manager(app)
        app.manager.add_command(
            'runserver',
            Server(
                host=app.config['FLASK_BIND'],
                port=app.config['FLASK_PORT']
            )
        )
        # import csv files
        app.manager.add_command('import', scripts.Import())

and the command is python main.py runserver locally. How can I pass the runserver part of the command to my app in the container to run it?

I imagine you solved your problem, so thanks for coming back to close the issue! 🚀

Sorry for the long delay! 🙈 I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.