Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR contains code changes and describes the required steps to deploy a Rails application with AnyCable on Qovery (full mode, with gRPC service).
Changes
bin/docker-entrypoint
script as an entrypoint (it's borrowed from Rails)web
andws
).Qovery tips
We tested our setup using Qovery playground cluster. The resulting formation is depicted below:
The
web
service is the default Rails web service.The
rpc
service is a clone of the web service with the following changes:["bundle","exec","anycable","--rpc-host","0.0.0.0:50051"]
(to run AnyCable RPC server)anycable.RPC
)The
ws
service is deployed directly from Dockerhub:/health
HTTP endpoint.The following environment variables have been set to connect services and databases:
DATABASE_URL
as an alias forQOVERY_POSTGRESQL_<XXX>_DATABASE_URL_INTERNAL
(scope: Application)REDIS_URL
as an alias forQOVERY_REDIS_<XXX>_DATABASE_URL_INTERNAL
(scope: Application)APPLICATION_RPC_HOST_INTERNAL
as an alias forQOVERY_APPLICATION_<RPC_SERVICE_ID>_HOST_INTERNAL
(scope: Environment)APPLICATION_WS_HOST_EXTERNAL
as an alias forQOVERY_APPLICATION_<WS_SERVICE_ID>_HOST_EXTERNAL
(scope: Environment)CABLE_URL
aswss://${APPLICATION_WS_HOST_EXTERNAL}/cable
(scope: Environment)ANYCABLE_RPC_HOST
as{{APPLICATION_RPC_HOST_INTERNAL}}:50051
(scope: Service,ws
)ANYCABLE_HOST=0.0.0.0
(scope: Service,ws
)