Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalable AnyCable #7

Open
wants to merge 1 commit into
base: feature/anycable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions config/anycable_nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
upstream grpcservers {
server anycable-rpc-one:50051;
server anycable-rpc-two:50051;
}

server {
listen 50051 http2;
server_name localhost;

access_log /var/log/nginx/grpc_log.json;
error_log /var/log/nginx/grpc_error_log.json debug;

location / {
grpc_pass grpc://grpcservers;
}
}
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ services:
- redis

anycable-rpc:
image: nginx:1.17.3-alpine
volumes:
- ./log:/var/log/nginx
- ./config/anycable_nginx.conf:/etc/nginx/conf.d/anycable.conf
ports:
- '50051'
depends_on:
- anycable-rpc-one
- anycable-rpc-two

anycable-rpc-one:
<<: *backend
command: bundle exec anycable
ports:
- '50051'

anycable-rpc-two:
<<: *backend
command: bundle exec anycable
ports:
Expand Down