-
-
Save hardyoyo/f029712f4f68f2986f6628d9c0c4ae91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
networks: | |
dspacenet: | |
ipam: | |
config: | |
# Define a custom subnet for our DSpace network, so that we can easily trust requests from host to container. | |
# If you customize this value, be sure to customize the 'proxies.trusted.ipranges' env variable below. | |
- subnet: 172.23.0.0/16 | |
services: | |
# DSpace PostgreSQL database container | |
dspacedb: | |
container_name: dspacedb | |
# Uses a custom Postgres image with pgcrypto installed | |
image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}" | |
build: | |
# Must build out of subdirectory to have access to install script for pgcrypto | |
context: ./dspace/src/main/docker/dspace-postgres-pgcrypto/ | |
environment: | |
PGDATA: /pgdata | |
POSTGRES_PASSWORD: dspace | |
networks: | |
dspacenet: | |
ports: | |
- published: 5432 | |
target: 5432 | |
stdin_open: true | |
tty: true | |
volumes: | |
# Keep Postgres data directory between reboots | |
- pgdata:/pgdata | |
# DSpace Solr container | |
dspacesolr: | |
container_name: dspacesolr | |
image: "${DOCKER_OWNER:-dspace}/dspace-solr:${DSPACE_VER:-latest}" | |
build: | |
context: . | |
dockerfile: ./dspace/src/main/docker/dspace-solr/Dockerfile | |
args: | |
SOLR_VERSION: "${SOLR_VER:-8.11}" | |
networks: | |
dspacenet: | |
ports: | |
- published: 8983 | |
target: 8983 | |
stdin_open: true | |
tty: true | |
working_dir: /var/solr/data | |
volumes: | |
# Keep Solr data directory between reboots | |
- solr_data:/var/solr/data | |
# Initialize all DSpace Solr cores then start Solr: | |
# * First, run precreate-core to create the core (if it doesn't yet exist). If exists already, this is a no-op | |
# * Second, copy configsets to this core: | |
# Updates to Solr configs require the container to be rebuilt/restarted: `docker compose -p d7 up -d --build dspacesolr` | |
entrypoint: | |
- /bin/bash | |
- '-c' | |
- | | |
init-var-solr | |
precreate-core authority /opt/solr/server/solr/configsets/authority | |
cp -r /opt/solr/server/solr/configsets/authority/* authority | |
precreate-core oai /opt/solr/server/solr/configsets/oai | |
cp -r /opt/solr/server/solr/configsets/oai/* oai | |
precreate-core search /opt/solr/server/solr/configsets/search | |
cp -r /opt/solr/server/solr/configsets/search/* search | |
precreate-core statistics /opt/solr/server/solr/configsets/statistics | |
cp -r /opt/solr/server/solr/configsets/statistics/* statistics | |
precreate-core qaevent /opt/solr/server/solr/configsets/qaevent | |
cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent | |
exec solr -f | |
volumes: | |
assetstore: | |
pgdata: | |
solr_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment