This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
85 lines (78 loc) · 1.63 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '2.4'
x-app-service-template: &app
image: anycable-demo:0.6.6
build:
context: .
dockerfile: .dockerdev/Dockerfile
args:
RUBY_VERSION: "2.6.5"
NODE_MAJOR: '12'
BUNDLER_VERSION: '1.17.1'
tmpfs:
- /tmp
environment: &env
NODE_ENV: development
RAILS_ENV: ${RAILS_ENV:-development}
ANYCABLE_DEBUG: ${DEBUG:-0}
ANYCABLE_RPC_HOST: 0.0.0.0:50051
x-backend: &backend
<<: *app
volumes:
- .:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/usr/local/bundle
- .dockerdev/.pryrc:/root/.pryrc:ro
- .dockerdev/.bashrc:/root/.bashrc:ro
tmpfs:
- /app/tmp/pids
environment:
<<: *env
REDIS_URL: redis://redis:6379/
WEB_CONCURRENCY: 1
HISTFILE: /app/tmp/cache/.bash_history
EDITOR: vi
CABLE_URL: ws://localhost:8080/cable
ADAPTER: any_cable
stdin_open: true
tty: true
depends_on:
redis:
condition: service_healthy
services:
web:
<<: *backend
command: bundle exec rails server -b 0.0.0.0
ports:
- '3000:3000'
rpc:
<<: *backend
command: bundle exec anycable
redis:
image: redis:5.0-alpine
volumes:
- redis:/data
ports:
- 6379
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 30
anycable:
image: 'anycable/anycable-go:1.0.0.preview1'
ports:
- "8080:8080"
environment:
PORT: 8080
ANYCABLE_HOST: 0.0.0.0
REDIS_URL: redis://redis:6379/0
ANYCABLE_RPC_HOST: rpc:50051
ANYCABLE_DEBUG: ${DEBUG:-0}
depends_on:
- redis
- rpc
volumes:
redis:
bundle:
assets:
rails_cache: