I'm trying to use GCP Cloud run to host both a REST and a gRPC service. I'm using sonora to multiplex the server so to be able to use the same port (443) for both services.
This is my init application so far:
from flask import Flask
from sonora.wsgi import grpcWSGI
from app.services.api.analyse.v1 import servicer
from app.domain.entity.analysis.proto.analysis_pb2_grpc import add_AnalyserServicer_to_server
from app.services.api.health.v1.health import health_check_blueprint
from app.services.api.analyse.v1.analyse import analyse_blueprint
app = Flask(__name__)
app.register_blueprint(health_check_blueprint)
app.register_blueprint(analyse_blueprint)
app.wsgi_app = grpcWSGI(app.wsgi_app)
add_AnalyserServicer_to_server(servicer, app)
But unfortunately I'm getting the error in the title when using my client to hit the gRPC function.
The REST endpoint seems to be working just fine.
The cmd in my Dockerfile stands as follows:
CMD exec gunicorn --bind :${PORT} --workers 1 --threads 8 --timeout 0 --log-level=error app.services.server.v1:app