-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (45 loc) · 1 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
version: "3.9"
##############################################
# Common config
##############################################
x-app-base: &app-base
image: app_base
stdin_open: true
tty: true
volumes:
- .:/app
environment:
- REDIS_URL=redis://redis:6379
- REDIS_PROVIDER=REDIS_URL
##############################################
# Services
##############################################
services:
web:
<<: *app-base
build: .
ports:
- "3000:3000"
command: ./bin/rails s -p 3000 -b '0.0.0.0'
depends_on:
- database
- sidekiq
database:
image: postgres:latest
volumes:
- .:/app
ports:
- "5432:5432"
environment:
POSTGRES_DB: rails_starter_development
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis:6.0.10-alpine
command: redis-server --appendonly yes # https://redis.io/topics/persistence
ports:
- "6379:6379"
sidekiq:
<<: *app-base
command: bundle exec sidekiq
depends_on:
- redis