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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions doc/sphinx-guides/source/container/running/demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
++++++++++++++++++

Expand Down
2 changes: 2 additions & 0 deletions docker/compose/demo/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ services:
restart: "no"
environment:
- TIMEOUT=3m
- ROOT_COLLECTION_ALIAS=root
- ROOT_COLLECTION_NAME=Root
command:
- bootstrap.sh
- dev
Expand Down
17 changes: 17 additions & 0 deletions modules/container-configbaker/scripts/bootstrap/demo/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
Expand Down
Loading