-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
172 lines (171 loc) · 4.79 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: '3.6'
services:
fedora:
env_file: .env
image: ghcr.io/samvera/fcrepo4:4.7.5
hostname: fedora-hyrax
volumes:
- ${FEDORA_DATA_DIR}:/data
ports:
- 8984:8080
environment:
JAVA_OPTIONS: '-Xmx4096m -Xms1024m -Dfcrepo.modeshape.configuration=classpath:/config/jdbc-postgresql/repository.json -Dfcrepo.postgresql.host=pg-fcrepo -Dfcrepo.postgresql.port=5432 -Dfcrepo.postgresql.username=${FEDORA_PG_USER} -Dfcrepo.postgresql.password=${FEDORA_PG_PASSWORD} -Dfcrepo.properties.management=relaxed'
MODESHAPE_CONFIG: 'classpath:/config/jdbc-postgresql/repository.json'
networks:
- fedora
depends_on:
pg-fcrepo:
condition: service_healthy
restart: always
logging: &logging
driver: "local"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --spider --tries=1 localhost:8080 || exit 1"]
interval: 30s
timeout: 5s
retries: 10
pg-fcrepo:
env_file: .env
image: postgres:15.4
hostname: pg-fcrepo
environment:
- POSTGRES_USER=$FEDORA_PG_USER
- POSTGRES_PASSWORD=$FEDORA_PG_PASSWORD
- POSTGRES_DB=$FEDORA_DB
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- db:/var/lib/postgresql/data
networks:
- fedora
restart: always
logging:
<<: *logging
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 30s
timeout: 5s
retries: 10
pg-hyrax:
env_file: .env
image: postgres:9.5.25-alpine
hostname: pg-hyrax
environment:
- POSTGRES_USER=$HYRAX_DB_USER
- POSTGRES_PASSWORD=$HYRAX_DB_PASSWORD
- POSTGRES_DB=$HYRAX_DB
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- db-hyrax:/var/lib/postgresql/data
networks:
- hyrax
restart: always
logging:
<<: *logging
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 30s
timeout: 5s
retries: 5
solr:
# For prod deployments, use tagged image for release
#image: ghcr.io/gwu-libraries/scholarspace-hyrax-solr:2.0.1
env_file: .env
build:
context: .
dockerfile: Dockerfile-solr
hostname: solr-hyrax
environment:
- SOLR_CORE=$SOLR_CORE
volumes:
- ${SOLR_DATA_DIR}:/opt/solr/server/solr/mycores
ports:
- 8983:8983
networks:
- hyrax
restart: always
logging:
<<: *logging
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --spider --tries=1 localhost:8983 || exit 1"]
interval: 30s
timeout: 5s
retries: 10
redis:
image: 'redis:5-alpine'
hostname: redis-hyrax
command: redis-server
networks:
- hyrax
restart: always
logging:
<<: *logging
healthcheck:
test: ["CMD", "redis-cli","ping"]
sidekiq:
env_file: .env
# For prod deployments, use tagged image for release
# image: ghcr.io/gwu-libraries/scholarspace-app:2.0.1
image: scholarspace-app
build:
context: .
depends_on:
redis:
condition: service_healthy
volumes:
- ${NGINX_CERT_DIR}:/opt/scholarspace/certs
- ${NGINX_KEY_DIR}:/opt/scholarspace/keys
- /opt/scholarspace/scholarspace-derivatives:/opt/scholarspace/scholarspace-derivatives
- /opt/scholarspace/scholarspace-ingest:/opt/scholarspace/scholarspace-ingest
- app-hyrax:/opt/scholarspace
# Uncomment for development
# - /opt/scholarspace/scholarspace-hyrax:/opt/scholarspace/scholarspace-hyrax
networks:
- hyrax
- fedora
restart: always
logging:
<<: *logging
command: ["bash", "-l", "docker/scripts/scholarspace-setup.sh", "sidekiq"]
app-server:
env_file: .env
# For prod deployments, use tagged image for release
# image: ghcr.io/gwu-libraries/scholarspace-app:2.0.1
image: scholarspace-app
depends_on:
pg-hyrax:
condition: service_healthy
solr:
condition: service_healthy
fedora:
condition: service_healthy
networks:
- hyrax
- fedora
ports:
- 80:80
- 443:443
- 3000:3000
volumes:
- ${NGINX_CERT_DIR}:/opt/scholarspace/certs
- ${NGINX_KEY_DIR}:/opt/scholarspace/keys
- /opt/scholarspace/scholarspace-derivatives:/opt/scholarspace/scholarspace-derivatives
- /opt/scholarspace/scholarspace-ingest:/opt/scholarspace/scholarspace-ingest
- app-hyrax:/opt/scholarspace
# Uncomment for development
# - /opt/scholarspace/scholarspace-hyrax:/opt/scholarspace/scholarspace-hyrax
restart: always
logging:
<<: *logging
volumes:
db:
db-hyrax:
app-hyrax:
networks:
hyrax:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-hyrax
fedora:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-fedora