-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
146 lines (137 loc) · 2.78 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: '3'
volumes:
fcrepo:
solr:
postgresdb:
redis:
uploads:
derivatives:
state:
logs:
networks:
internal:
services:
fcrepo:
image: ualbertalib/docker-fcrepo4:4.7
expose:
- 8080
ports:
- 8080:8080
volumes:
- fcrepo:/data
env_file:
- .env
depends_on:
- postgresdb
networks:
internal:
solr:
image: solr:7-alpine
expose:
- 8983
ports:
- 8983:8983
env_file:
- .env
healthcheck:
test:
- CMD
- wget
- "-O"
- "/dev/null"
- http://localhost:8983/solr/
interval: 30s
timeout: 5s
retries: 3
networks:
internal:
volumes:
- solr:/opt/solr/server/solr/mycores
- ./solr/config:/opt/solr/solr_conf
entrypoint:
- docker-entrypoint.sh
- solr-precreate
- ${SOLR_CORE}
- /opt/solr/solr_conf
postgresdb:
image: postgres:11-alpine
volumes:
- postgresdb:/var/lib/postgresql/data
env_file:
- .env
environment:
- POSTGRES_DB=${FCREPO_DB}
healthcheck:
test: "CMD echo 'SELECT 1' | POSTGRES_PASSWORD=${POSTGRES_PASSWORD} psql --host 127.0.0.1 --username #{POSTGRES_USER} --dbname #{POSTGRES_DB} --quiet --no-align --tuples-only"
interval: 30s
timeout: 5s
retries: 3
volumes:
- postgresdb:/var/lib/postgresql/data
networks:
internal:
expose:
- 5432
ports:
- 5432:5432
app: &app
build:
context: .
args:
RAILS_ENV: ${RAILS_ENV}
LOGS_PATH: ${LOGS_PATH}
UPLOADS_PATH: ${UPLOADS_PATH}
DERIVATIVES_PATH: ${DERIVATIVES_PATH}
CACHE_PATH: ${CACHE_PATH}
WORKING_PATH: ${WORKING_PATH}
BRANDING_PATH: ${BRANDING_PATH}
APP_WORKDIR: ${APP_WORKDIR}
GEM_KEY: ${GEM_KEY}
GEM_SOURCE: ${GEM_SOURCE}
FITS_VERSION: ${FITS_VERSION}
SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY}
env_file:
- .env
volumes:
- uploads:${UPLOADS_PATH}
- derivatives:${DERIVATIVES_PATH}
- state:$APP_WORKDIR/shared/state
- logs:${LOGS_PATH}
tmpfs:
- /${PIDS_PATH}
networks:
internal:
depends_on:
- postgresdb
- solr
- fcrepo
- redis
web:
<<: *app
entrypoint:
- /bin/docker-entrypoint-web.sh
expose:
- ${RAILS_PORT}
ports:
- ${EXTERNAL_PORT}:${RAILS_PORT}
workers:
<<: *app
entrypoint:
- /bin/docker-entrypoint-worker.sh
redis:
image: redis:5
command: redis-server --appendonly yes
volumes:
- redis:/data
expose:
- 6379
networks:
internal:
healthcheck:
test:
- CMD
- redis-cli
- ping
interval: 30s
timeout: 5s
retries: 3