Fix app init to work with gunicorn

This commit is contained in:
Gregoo 2025-01-17 14:36:19 +01:00
parent 6477be00b6
commit c3f3ed0593
3 changed files with 13 additions and 13 deletions

View File

@ -9,4 +9,4 @@ RUN pip install -r requirements.txt
# Bricktracker
COPY . .
ENTRYPOINT ["entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]

4
app.py
View File

@ -11,8 +11,6 @@ from bricktracker.socket import BrickSocket # noqa: E402
logger = logging.getLogger(__name__)
if __name__ == '__main__':
# Create the Flask app
app = Flask(__name__)
@ -25,6 +23,8 @@ if __name__ == '__main__':
threaded=not app.config['NO_THREADED_SOCKET'].value,
)
if __name__ == '__main__':
# Run the application
logger.info('Starting BrickTracker on {host}:{port}'.format(
host=app.config['HOST'].value,

0
entrypoint.sh Normal file → Executable file
View File