Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in demo/eval env, configure root collection alias and name #11196

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
in demo/eval env, configure root collection alias and name #10541
pdurbin committed Jan 28, 2025
commit 17a6f195f6dd148cb58cc99d248d5049564f544c
9 changes: 9 additions & 0 deletions doc/sphinx-guides/source/container/running/demo.rst
Original file line number Diff line number Diff line change
@@ -137,6 +137,15 @@ In the example below of configuring :ref:`:FooterCopyright` we use the default u

One you make this change it should be visible in the copyright in the bottom left of every page.

Root Collection Alias and Name
++++++++++++++++++++++++++++++


Before running ``docker compose up`` for the first time, you can customize the root collection alias and name by editing the following variables in ``compose.yml``:

- ROOT_COLLECTION_ALIAS=root
- ROOT_COLLECTION_NAME=Root

Multiple Languages
++++++++++++++++++

2 changes: 2 additions & 0 deletions docker/compose/demo/compose.yml
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@ services:
restart: "no"
environment:
- TIMEOUT=3m
- ROOT_COLLECTION_ALIAS=root
- ROOT_COLLECTION_NAME=Root
command:
- bootstrap.sh
- dev
17 changes: 17 additions & 0 deletions modules/container-configbaker/scripts/bootstrap/demo/init.sh
Original file line number Diff line number Diff line change
@@ -9,6 +9,12 @@ export DATAVERSE_URL
BLOCKED_API_KEY=${BLOCKED_API_KEY:-"unblockme"}
export BLOCKED_API_KEY

ROOT_COLLECTION_ALIAS=${ROOT_COLLECTION_ALIAS:-"root"}
export ROOT_COLLECTION_ALIAS

ROOT_COLLECTION_NAME=${ROOT_COLLECTION_NAME:-"Root"}
export ROOT_COLLECTION_NAME

# --insecure is used so we can configure a few things but
# later in this script we'll apply the changes as if we had
# run the script without --insecure.
@@ -19,6 +25,17 @@ echo ""
echo "Setting DOI provider to \"FAKE\"..."
curl -sS -X PUT -d FAKE "${DATAVERSE_URL}/api/admin/settings/:DoiProvider"

API_TOKEN=$(grep apiToken "/tmp/setup-all.sh.out" | jq ".data.apiToken" | tr -d \")
export API_TOKEN

echo ""
echo "Setting root collection alias to ${ROOT_COLLECTION_ALIAS}..."
curl -sS -X PUT -H "X-Dataverse-key:$API_TOKEN" "$DATAVERSE_URL/api/dataverses/:root/attribute/alias?value=$ROOT_COLLECTION_ALIAS"

echo ""
echo "Setting root collection name to ${ROOT_COLLECTION_NAME}..."
curl -sS -X PUT -H "X-Dataverse-key:$API_TOKEN" "$DATAVERSE_URL/api/dataverses/:root/attribute/name?value=$ROOT_COLLECTION_NAME"

echo ""
echo "Revoke the key that allows for creation of builtin users..."
curl -sS -X DELETE "${DATAVERSE_URL}/api/admin/settings/BuiltinUsers.KEY"