Skip to content

Commit

Permalink
stub out demo/eval compose.yml based on dev compose #10238
Browse files Browse the repository at this point in the history
Differences from dev version:

- localstack and minio removed
- env vars filled in based on current .env

The goal is to have a single file to download, rather than a compose
file and an .env file.
  • Loading branch information
pdurbin committed Jan 26, 2024
1 parent fb58d89 commit cc29efe
Showing 1 changed file with 170 additions and 0 deletions.
170 changes: 170 additions & 0 deletions docker/compose/demo/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
version: "2.4"

services:

dev_dataverse:
container_name: "dev_dataverse"
hostname: dataverse
image: gdcc/dataverse:unstable
restart: on-failure
user: payara
environment:
DATAVERSE_DB_HOST: postgres
DATAVERSE_DB_PASSWORD: secret
DATAVERSE_DB_USER: dataverse
ENABLE_JDWP: "1"
DATAVERSE_FEATURE_API_BEARER_AUTH: "1"
DATAVERSE_AUTH_OIDC_ENABLED: "1"
DATAVERSE_AUTH_OIDC_CLIENT_ID: test
DATAVERSE_AUTH_OIDC_CLIENT_SECRET: 94XHrfNRwXsjqTqApRrwWmhDLDHpIYV8
DATAVERSE_AUTH_OIDC_AUTH_SERVER_URL: http://keycloak.mydomain.com:8090/realms/test
DATAVERSE_JSF_REFRESH_PERIOD: "1"
# These two oai settings are here to get HarvestingServerIT to pass
dataverse_oai_server_maxidentifiers: "2"
dataverse_oai_server_maxrecords: "2"
JVM_ARGS: -Ddataverse.files.storage-driver-id=file1
-Ddataverse.files.file1.type=file
-Ddataverse.files.file1.label=Filesystem
-Ddataverse.files.file1.directory=${STORAGE_DIR}/store
ports:
- "8080:8080" # HTTP (Dataverse Application)
- "4848:4848" # HTTP (Payara Admin Console)
- "9009:9009" # JDWP
- "8686:8686" # JMX
networks:
- dataverse
depends_on:
- dev_postgres
- dev_solr
- dev_dv_initializer
volumes:
- ./docker-dev-volumes/app/data:/dv
- ./docker-dev-volumes/app/secrets:/secrets
# Uncomment to map the glassfish applications folder so that we can update webapp resources using scripts/intellij/cpwebapp.sh
# - ./docker-dev-volumes/glassfish/applications:/opt/payara/appserver/glassfish/domains/domain1/applications
# Uncomment for changes to xhtml to be deployed immediately (if supported your IDE or toolchain).
# Replace 6.0 with the current version.
# - ./target/dataverse-6.0:/opt/payara/deployments/dataverse
tmpfs:
- /dumps:mode=770,size=2052M,uid=1000,gid=1000
- /tmp:mode=770,size=2052M,uid=1000,gid=1000
mem_limit: 2147483648 # 2 GiB
mem_reservation: 1024m
privileged: false

dev_bootstrap:
container_name: "dev_bootstrap"
image: gdcc/configbaker:unstable
restart: "no"
command:
- bootstrap.sh
- dev
networks:
- dataverse

dev_dv_initializer:
container_name: "dev_dv_initializer"
image: gdcc/configbaker:unstable
restart: "no"
command:
- sh
- -c
- "fix-fs-perms.sh dv"
volumes:
- ./docker-dev-volumes/app/data:/dv

dev_postgres:
container_name: "dev_postgres"
hostname: postgres
image: postgres:13
restart: on-failure
environment:
- POSTGRES_USER=dataverse
- POSTGRES_PASSWORD=secret
ports:
- "5432:5432"
networks:
- dataverse
volumes:
- ./docker-dev-volumes/postgresql/data:/var/lib/postgresql/data

dev_solr_initializer:
container_name: "dev_solr_initializer"
image: gdcc/configbaker:unstable
restart: "no"
command:
- sh
- -c
- "fix-fs-perms.sh solr && cp -a /template/* /solr-template"
volumes:
- ./docker-dev-volumes/solr/data:/var/solr
- ./docker-dev-volumes/solr/conf:/solr-template

dev_solr:
container_name: "dev_solr"
hostname: "solr"
image: solr:9.3.0
depends_on:
- dev_solr_initializer
restart: on-failure
ports:
- "8983:8983"
networks:
- dataverse
command:
- "solr-precreate"
- "collection1"
- "/template"
volumes:
- ./docker-dev-volumes/solr/data:/var/solr
- ./docker-dev-volumes/solr/conf:/template

dev_smtp:
container_name: "dev_smtp"
hostname: "smtp"
image: maildev/maildev:2.0.5
restart: on-failure
ports:
- "25:25" # smtp server
- "1080:1080" # web ui
environment:
- MAILDEV_SMTP_PORT=25
- MAILDEV_MAIL_DIRECTORY=/mail
networks:
- dataverse
#volumes:
# - ./docker-dev-volumes/smtp/data:/mail
tmpfs:
- /mail:mode=770,size=128M,uid=1000,gid=1000

dev_keycloak:
container_name: "dev_keycloak"
image: 'quay.io/keycloak/keycloak:21.0'
hostname: keycloak
environment:
- KEYCLOAK_ADMIN=kcadmin
- KEYCLOAK_ADMIN_PASSWORD=kcpassword
- KEYCLOAK_LOGLEVEL=DEBUG
- KC_HOSTNAME_STRICT=false
networks:
dataverse:
aliases:
- keycloak.mydomain.com #create a DNS alias within the network (add the same alias to your /etc/hosts to get a working OIDC flow)
command: start-dev --import-realm --http-port=8090 # change port to 8090, so within the network and external the same port is used
ports:
- "8090:8090"
volumes:
- './conf/keycloak/test-realm.json:/opt/keycloak/data/import/test-realm.json'

dev_nginx:
container_name: dev_nginx
image: gdcc/dev_nginx:unstable
ports:
- "4849:4849"
restart: always
networks:
- dataverse

networks:
dataverse:
driver: bridge

0 comments on commit cc29efe

Please sign in to comment.