How to setup AnyCable with Docker #149
-
Hi there! I'm quite new to Docker and I've been trying to create an image that includes AnyCable. But the resources I found regarding Dockerizing AnyCable aren't very beginner-friendly. I ran the anycable:setup command and it gave me a snippet, and I modified it accordingly (which may be wrong). When looking at the logs, I see this:
From what I understand, that's the port of the database. But I can't find any issues with it. Here's my Dockerfile
Here's my docker-compose file
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You need to provide database address to Either include web: &backend
environment: &backend_environment
DATABASE_HOST: db
ANYCABLE_REDIS_URL: redis://redis:6379/0
anycable:
<<: *backend
environment:
<<: *backend_environment
ANYCABLE_RPC_HOST: 0.0.0.0:50051
ANYCABLE_DEBUG: 1 Please note that I also moved |
Beta Was this translation helpful? Give feedback.
You need to provide database address to
anycable
service too.Either include
backend_environment
toanycable
serviceenvironment
(and make sure they use the same hash-style definition) or provideDATABASE_URL
(or your seemingly customDATABASE_HOST
) env var toanycable
service explicitly.Please note that I also moved
ANYCABLE_REDIS_URL
toweb
as Web processes often also need to know where AnyCable Redis is to send broadcasts f…