-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
110 lines (107 loc) · 2.18 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: "3.6"
x-base: &base
env_file: .env
tty: true
stdin_open: true
build:
context: .
dockerfile: Dockerfile.dev
services:
database:
image: postgres:16
restart: always
volumes:
- 'postgres:/var/lib/postgresql/data'
ports:
- "5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7
restart: always
volumes:
- "redis:/data"
ports:
- "6379"
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 5s
timeout: 5s
retries: 5
ws:
image: anycable/anycable-go:1.4
ports:
- '8085:8085'
env_file: .env
depends_on:
redis:
condition: service_healthy
app:
<<: *base
command: bash -c "rm -f tmp/pids/server.pid && /rails/bin/dev"
restart: always
volumes:
- ".:/rails"
- "/rails/node_modules" # don't mount node_modules
ports:
- "3000"
links:
- "database"
- "redis"
depends_on:
database:
condition: service_healthy
sidekiq:
<<: *base
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
command: "bundle exec sidekiq"
restart: always
volumes:
- ".:/rails"
- "/rails/tmp" # don't mount tmp
anycable:
<<: *base
command: bundle exec anycable
volumes:
- ".:/rails"
ports:
- "50051"
depends_on:
database:
condition: service_healthy
ws:
condition: service_started
env_file:
- ".env"
- ".anycable.env"
nginx:
image: nginx:1.27
links:
- "app"
volumes:
- "./config/nginx/development:/etc/nginx/conf.d"
- "./app/assets:/app/public"
ports:
- "3000:80"
chrome: # docker-compose up -d chrome
image: browserless/chrome:latest # See https://www.browserless.io/docs/docker
ports:
- "3333:3333"
volumes:
- .:/app:cached
environment:
PORT: 3333
CONNECTION_TIMEOUT: -1 # No timeout
volumes:
redis:
postgres: