This repository has been archived by the owner on Apr 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·88 lines (88 loc) · 2 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
version: '3.8'
services:
db:
build: docker/db
volumes:
- db_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_INITDB_ARGS=${POSTGRES_INITDB_ARGS}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -h localhost"]
interval: 30s
timeout: 5s
retries: 3
web:
environment:
- http_proxy
- https_proxy
- no_proxy=solr,localhost
env_file:
- ./.env
build:
context: .
args:
- http_proxy
- https_proxy
- no_proxy
image: projectnextl/enju_leaf:latest
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/enju
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost:3000"]
interval: 30s
timeout: 5s
retries: 3
ports:
- "3000:3000"
depends_on:
- db
- solr
- redis
worker:
environment:
- http_proxy
- https_proxy
- no_proxy=solr
env_file:
- ./.env
build:
context: .
args:
- http_proxy
- https_proxy
- no_proxy
image: projectnextl/enju_leaf:latest
command: bash -c "bundle exec rake environment resque:work QUEUE=default,mailers TERM_CHILD=1"
volumes:
- .:/enju
depends_on:
- db
- solr
- redis
redis:
image: redis:5-alpine
volumes:
- redis_data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 30s
timeout: 5s
retries: 3
solr:
build: docker/solr
volumes:
- solr_data:/var/solr/data
- ./solr:/mnt/solr
command: bash -c "precreate-core enju_leaf_${RAILS_ENV} /mnt/solr/configsets/sunspot/conf/; exec solr -f"
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost:8983/solr/"]
interval: 30s
timeout: 5s
retries: 3
volumes:
db_data:
solr_data:
redis_data: