-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
153 lines (143 loc) · 2.89 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
147
148
149
150
151
152
153
version: '3'
volumes:
fcrepo:
solr:
postgresdb:
redis:
uploads:
derivatives:
state:
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:12-alpine
volumes:
- postgresdb:/var/lib/postgresql/data
env_file:
- .env
environment:
- POSTGRES_DB=${FCREPO_DB}
- POSTGRES_USER=${FCREPO_USER}
- POSTGRES_PASSWORD=${FCREPO_PASSWORD}
healthcheck:
test: "CMD echo 'SELECT 1' | PGPASSWORD=${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
networks:
internal:
expose:
- 5432
ports:
- 5432:5432
app: &app
build:
context: .
args:
RAILS_ENV: ${RAILS_ENV}
UPLOADS_PATH: ${UPLOADS_PATH}
DERIVATIVES_PATH: ${DERIVATIVES_PATH}
CACHE_PATH: ${CACHE_PATH}
WORKING_PATH: ${WORKING_PATH}
BRANDING_PATH: ${BRANDING_PATH}
APP_WORKDIR: ${APP_WORKDIR}
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
- .:/${APP_WORKDIR}
tmpfs:
- /${PIDS_PATH}
networks:
internal:
depends_on:
- postgresdb
- solr
- fcrepo
- redis
console:
<<: *app
tty: true
stdin_open: true
entrypoint:
- /bin/docker-entrypoint-console.sh
web:
<<: *app
tty: true
stdin_open: true
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
ports:
- 6379:6379
networks:
internal:
healthcheck:
test:
- CMD
- redis-cli
- ping
interval: 30s
timeout: 5s
retries: 3