-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
58 lines (54 loc) · 1.15 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
version: "3.9"
services:
aggapp:
container_name: aggapp
build:
context: .
dockerfile: Dockerfile
environment:
RAILS_ENV: development
SIDEKIQ_REDIS_URL: redis://aggcache:6379/0
DATABASE_URL: postgres://pod4lib:pod4lib@aggdb:5432/aggregator
ports:
- "3000:3000"
volumes:
- .:/usr/src/app
depends_on:
- aggdb
- aggcache
aggworker:
container_name: aggworker
build:
context: .
dockerfile: Dockerfile
command: bundle exec sidekiq
environment:
SIDEKIQ_REDIS_URL: redis://aggcache:6379/0
DATABASE_URL: postgres://pod4lib:pod4lib@aggdb:5432/aggregator
RAILS_MAX_THREADS: 5
volumes:
- .:/usr/src/app
depends_on:
- aggdb
- aggcache
aggdb:
container_name: aggdb
image: postgres:12.8
environment:
POSTGRES_USER: pod4lib
POSTGRES_PASSWORD: pod4lib
POSTGRES_DB: aggregator
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
aggcache:
container_name: aggcache
image: redis:7.0
ports:
- "6379:6379"
volumes:
- cache:/data
volumes:
db:
cache: