-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
134 lines (134 loc) · 2.98 KB
/
Copy pathdocker-compose.yml
File metadata and controls
134 lines (134 loc) · 2.98 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
services:
app:
container_name: ${PREFIX}-app
build:
context: .
dockerfile: Dockerfile
target: development
image: ${PREFIX}-app
restart: unless-stopped
env_file: .env
depends_on:
- db
- solr
- redis
ports:
- '3000:3000'
volumes:
- .:/code
- bundle-cache:/usr/local/bundle
- node_modules:/code/node_modules
environment:
RAILS_ENV: development
RAILS_LOG_TO_STDOUT: 'true'
db:
container_name: ${PREFIX}-db
logging:
driver: none
image: postgres:14.2
restart: unless-stopped
env_file: .env
environment:
PGDATA: /var/lib/postgresql/data
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 5s
volumes:
- db-data:/var/lib/postgresql/data
adminer:
container_name: ${PREFIX}-adminer
image: adminer:5.4.2
restart: unless-stopped
ports:
- '127.0.0.1:8080:8080'
depends_on:
- db
solr:
container_name: ${PREFIX}-solr
image: solr:8
restart: unless-stopped
volumes:
- solr-data:/var/solr
- ./solr:/opt/solr/server/solr/configsets/development
command:
- solr-precreate
- tess
- /opt/solr/server/solr/configsets/development
ports:
- '8984:8983'
redis:
container_name: ${PREFIX}-redis
image: redis:7
restart: unless-stopped
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 30
volumes:
- redis-data:/data
sidekiq:
container_name: ${PREFIX}-sidekiq
image: ${PREFIX}-app
restart: unless-stopped
healthcheck:
test: bundle exec sidekiqmon | grep $(hostname)
depends_on:
- app
- db
- redis
volumes:
- .:/code
- bundle-cache:/usr/local/bundle
env_file: .env
environment:
RAILS_ENV: development
command: bundle exec sidekiq
test:
profiles:
- test
depends_on:
- test-db
- redis
container_name: ${PREFIX}-test
build:
context: .
dockerfile: Dockerfile
image: ${PREFIX}-app
volumes:
- .:/code
- bundle-cache:/usr/local/bundle
- node_modules:/code/node_modules
- ./coverage:/code/coverage
environment:
RAILS_ENV: test
DB_HOST: test-db
DB_NAME: tess-test
DB_USER: tess-test
DB_PASSWORD: tess-test
REDIS_TEST_URL: redis://redis:6379/0
command: sh -c "rake db:test:prepare && rails test"
test-db:
profiles:
- test
container_name: ${PREFIX}-test-db
logging:
driver: none
image: postgres:14.2
environment:
PGDATA: /var/lib/postgresql/data
POSTGRES_DB: tess-test
POSTGRES_USER: tess-test
POSTGRES_PASSWORD: tess-test
volumes:
- test-db-data:/var/lib/postgresql/data
volumes:
db-data:
solr-data:
redis-data:
bundle-cache:
node_modules:
test-db-data: