Commits
Tim Donohue authored b9cc5ba824b
26 26 | dspace__P__dir /dspace |
27 27 | dspace__P__server__P__url http //127.0.0.1 8080/server |
28 28 | dspace__P__ui__P__url http //127.0.0.14000 |
29 29 | # db.url: Ensure we are using the 'dspacedb' image for our database |
30 30 | db__P__url 'jdbc:postgresql://dspacedb:5432/dspace' |
31 31 | # solr.server: Ensure we are using the 'dspacesolr' image for Solr |
32 32 | solr__P__server http //dspacesolr 8983/solr |
33 33 | # Tell Statistics to commit all views immediately instead of waiting on Solr's autocommit. |
34 34 | # This allows us to generate statistics in e2e tests so that statistics pages can be tested thoroughly. |
35 35 | solr__D__statistics__P__autoCommit 'false' |
36 + | image "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-7_x-test}" |
36 37 | depends_on |
37 38 | dspacedb |
38 - | image dspace/dspace dspace-7_x-test |
39 39 | networks |
40 - | dspacenet |
40 + | dspacenet |
41 41 | ports |
42 42 | published 8080 |
43 43 | target 8080 |
44 44 | stdin_open true |
45 45 | tty true |
46 46 | volumes |
47 47 | assetstore:/dspace/assetstore |
48 - | # Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below) |
49 - | solr_configs:/dspace/solr |
50 48 | # Ensure that the database is ready BEFORE starting tomcat |
51 49 | # 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep |
52 50 | # 2. Then, run database migration to init database tables (including any out-of-order ignored migrations, if any) |
53 51 | # 3. Finally, start Tomcat |
54 52 | entrypoint |
55 53 | /bin/bash |
56 54 | '-c' |
57 55 | | |
58 56 | while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done; |
59 57 | /dspace/bin/dspace database migrate ignored |
63 61 | dspacedb |
64 62 | container_name dspacedb |
65 63 | environment |
66 64 | # This LOADSQL should be kept in sync with the LOADSQL in |
67 65 | # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml |
68 66 | # This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data |
69 67 | LOADSQL https //github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql |
70 68 | PGDATA /pgdata |
71 69 | image dspace/dspace-postgres-pgcrypto loadsql |
72 70 | networks |
73 - | dspacenet |
71 + | dspacenet |
74 72 | stdin_open true |
75 73 | tty true |
76 74 | volumes |
75 + | # Keep Postgres data directory between reboots |
77 76 | pgdata:/pgdata |
78 77 | # DSpace Solr container |
79 78 | dspacesolr |
80 79 | container_name dspacesolr |
81 - | # Uses official Solr image at https://hub.docker.com/_/solr/ |
82 - | image solr8.11-slim |
83 - | # Needs main 'dspace' container to start first to guarantee access to solr_configs |
84 - | depends_on |
85 - | dspace |
80 + | image "${DOCKER_OWNER:-dspace}/dspace-solr:${DSPACE_VER:-dspace-7_x}" |
86 81 | networks |
87 - | dspacenet |
82 + | dspacenet |
88 83 | ports |
89 84 | published 8983 |
90 85 | target 8983 |
91 86 | stdin_open true |
92 87 | tty true |
93 88 | working_dir /var/solr/data |
94 89 | volumes |
95 - | # Mount our "solr_configs" volume available under the Solr's configsets folder (in a 'dspace' subfolder) |
96 - | # This copies the Solr configs from main 'dspace' container into 'dspacesolr' via that volume |
97 - | solr_configs:/opt/solr/server/solr/configsets/dspace |
98 90 | # Keep Solr data directory between reboots |
99 91 | solr_data:/var/solr/data |
100 92 | # Initialize all DSpace Solr cores using the mounted configsets (see above), then start Solr |
101 93 | entrypoint |
102 94 | /bin/bash |
103 95 | '-c' |
104 96 | | |
105 97 | init-var-solr |
106 - | precreate-core authority /opt/solr/server/solr/configsets/dspace/authority |
107 - | precreate-core oai /opt/solr/server/solr/configsets/dspace/oai |
108 - | precreate-core search /opt/solr/server/solr/configsets/dspace/search |
109 - | precreate-core statistics /opt/solr/server/solr/configsets/dspace/statistics |
98 + | precreate-core authority /opt/solr/server/solr/configsets/authority |
99 + | cp -r /opt/solr/server/solr/configsets/authority/* authority |
100 + | precreate-core oai /opt/solr/server/solr/configsets/oai |
101 + | cp -r /opt/solr/server/solr/configsets/oai/* oai |
102 + | precreate-core search /opt/solr/server/solr/configsets/search |
103 + | cp -r /opt/solr/server/solr/configsets/search/* search |
104 + | precreate-core statistics /opt/solr/server/solr/configsets/statistics |
105 + | cp -r /opt/solr/server/solr/configsets/statistics/* statistics |
110 106 | exec solr -f |
111 107 | volumes |
112 108 | assetstore |
113 109 | pgdata |
114 110 | solr_data |
115 - | # Special volume used to share Solr configs from 'dspace' to 'dspacesolr' container (see above) |
116 - | solr_configs |