-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
136 lines (127 loc) · 3.26 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
version: '3.4'
x-app: &app
build:
context: .
target: hyrax-base
# command: sh -l -c "bundle && bundle exec puma -v -b tcp://0.0.0.0:3000"
image: ghcr.io/notch8/atla_digital_library:${TAG:-latest}
env_file:
- .env
# NOTE: all common env variables moved to .env
volumes:
- node_modules:/app/samvera/hyrax-webapp/node_modules:cached
- uploads:/app/samvera/hyrax-webapp/public/uploads:cached
- assets:/app/samvera/hyrax-webapp/public/assets:cached
- cache:/app/samvera/hyrax-webapp/tmp/cache:cached
- .:/app/samvera/hyrax-webapp
services:
worker:
<<: *app
build:
context: .
target: hyrax-worker
cache_from:
- ghcr.io/notch8/atla_digital_library:${TAG:-latest}
- ghcr.io/notch8/atla_digital_library/worker:${TAG:-latest}
image: ghcr.io/notch8/atla_digital_library/worker:${TAG:-latest}
command: bash -l -c "bundle && yarn install && bin/rails jobs:work"
depends_on:
postgres:
condition: service_started
solr:
condition: service_started
fcrepo:
condition: service_started
redis:
condition: service_started
initialize_app:
condition: service_completed_successfully
web:
<<: *app
command: sh -l -c "bundle && yarn install && bundle exec puma -v -b tcp://0.0.0.0:3000"
# ports:
# - "3000:3000"
environment:
VIRTUAL_HOST: atla.test
VIRTUAL_PORT: 3000
depends_on:
postgres:
condition: service_started
solr:
condition: service_started
fcrepo:
condition: service_started
redis:
condition: service_started
worker:
condition: service_started
initialize_app:
condition: service_completed_successfully
redis:
image: redis:3
ports:
- '6379'
volumes:
- 'redis:/data'
postgres:
image: postgres:9.6
environment:
POSTGRES_DB: ${DATABASE_DB}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_USER: "${DATABASE_USER}"
ports:
- "5432"
volumes:
- 'postgres:/var/lib/postgresql/data'
solr:
image: solr:7.7
ports:
- "8983"
environment:
VIRTUAL_HOST: solr.atla.test
VIRTUAL_PORT: 8983
OOM: script
volumes:
- './solr/conf:/opt/config:delegated'
- solr:/opt/solr/server/solr/mycores
entrypoint:
- docker-entrypoint.sh
- solr-precreate
- "${SOLR_CORE}"
- /opt/config
fcrepo:
image: ghcr.io/samvera/fcrepo4:4.7.5
volumes:
- fcrepo:/data:cached
env_file:
- .env
environment:
- VIRTUAL_PORT=8080
- VIRTUAL_HOST=fcrepo.atla.test
- JAVA_OPTS=${JAVA_OPTS} -Dfcrepo.modeshape.configuration="classpath:/config/file-simple/repository.json" -Dfcrepo.object.directory="/data/objects" -Dfcrepo.binary.directory="/data/binaries"
ports:
- "8080"
initialize_app:
<<: *app
entrypoint: ["sh", "-c"]
command:
- >
bundle && db-migrate-seed.sh
depends_on:
postgres:
condition: service_started
solr:
condition: service_started
fcrepo:
condition: service_started
redis:
condition: service_started
volumes:
fcrepo:
postgres:
redis:
solr:
uploads:
assets:
cache:
node_modules: