fix docker
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 18s

This commit is contained in:
2025-12-21 04:53:42 -03:00
parent 773229ee76
commit c759969493

12
run.py
View File

@@ -13,6 +13,12 @@ from app.utils import setup_custom_dns
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# Initialize custom DNS resolver globally so it runs for Gunicorn too
setup_custom_dns()
# Create the Flask app globally so Gunicorn can find 'app'
app = create_app()
def main(): def main():
"""Main entry point for the application""" """Main entry point for the application"""
@@ -23,12 +29,6 @@ def main():
) )
args = parser.parse_args() args = parser.parse_args()
# Initialize custom DNS resolver
setup_custom_dns()
# Create the Flask app
app = create_app()
# Run the app # Run the app
logger.info(f"Starting Xtream2M3U server on port {args.port}") logger.info(f"Starting Xtream2M3U server on port {args.port}")
app.run(debug=True, host="0.0.0.0", port=args.port) app.run(debug=True, host="0.0.0.0", port=args.port)