From 4421abfae646315928cdea612bfa84553663c576 Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Mon, 25 Nov 2024 14:31:49 -0500 Subject: [PATCH] docs: minor readme + compose updates (#174) * docs: minor readme + compose updates * note COMPOSE_PROFILES --- README-keycloak.md | 5 ++++- README.md | 4 ++-- docker-compose.yml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README-keycloak.md b/README-keycloak.md index 642b19ca..d5485d5f 100644 --- a/README-keycloak.md +++ b/README-keycloak.md @@ -29,7 +29,10 @@ If you want to use the Keycloak instance, follow these steps: 1. Start the stack normally. The `db` container needs to be up and running, at least. 1. In `config/keycloak/tls`, copy `tls.crt.default` and `tls.key.default` to `tls.crt` and `tls.key`. (Or, you can regenerate them - see the README in that folder.) 2. Create a database called `keycloak`. For example: `docker compose --profile keycloak run --rm -ti db psql -h db -U postgres -c 'create database keycloak;'` (then enter the default password of `postgres` when it asks) -3. Add a keystore password to your `.env` file. This should be set in `KEYCLOAK_SVC_KEYSTORE_PASSWORD`. This is required, but the password need not be anything special. + - After this initial setup, you can have this container start automatically by setting `COMPOSE_PROFILES=keycloak` in your `.env` file. +3. Set required keycloak environment values in your `.env` file: + - Set a keystore password via `KEYCLOAK_SVC_KEYSTORE_PASSWORD`. This is required, but the password need not be anything special. + - Set `KEYCLOAK_CLIENT_SECRET`; ask another developer for the relevant value. 4. Optionally add `KEYCLOAK_SVC_HOSTNAME`, `KEYCLOAK_SVC_ADMIN`, and `KEYCLOAK_SVC_ADMIN_PASSWORD` to your `.env` file. 1. `KEYCLOAK_SVC_HOSTNAME` is the hostname you want to use for the instance - the default is `kc.odl.local`. 2. `KEYCLOAK_SVC_ADMIN` is the admin username. The default is `admin`. diff --git a/README.md b/README.md index ed1dfde9..7b6bf51d 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,9 @@ The `add_system` command will generate an API key for the system's use. You can ### API Access -You can interact with the API directly through the Swagger interface: `/api/schema/swagger-ui/` +You can interact with the API directly through the Swagger interface: `/api/v0/schema/swagger-ui/` -The system also exposes a Redoc version of the API at `/api/schema/redoc/` +The system also exposes a Redoc version of the API at `/api/v0/schema/redoc/` Navigating to an API endpoint in the browser should also get you the normal DRF interface as well. diff --git a/docker-compose.yml b/docker-compose.yml index 9dfcf1ff..d74bfe91 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -111,7 +111,7 @@ services: - ${KEYCLOAK_SVC_HOSTNAME:-kc.odl.local} links: - db:uedb - command: start --verbose --features scripts --import-realm --hostname=${KEYCLOAK_SVC_HOSTNAME:-kc.odl.local} --hostname-strict=false --hostname-debug=true --https-port=7443 --https-certificate-file=/etc/x509/https/tls.crt --https-certificate-key-file=/etc/x509/https/tls.key --http-enabled=true --http-port=7080 --config-keystore=/etc/keycloak-store --config-keystore-password=${KEYCLOAK_SVC_KEYSTORE_PASSWORD} --db=postgres --db-url-database=keycloak --db-url-host=uedb --db-schema=public --db-password=${POSTGRES_PASSWORD} --db-username=postgres + command: start --verbose --features scripts --import-realm --hostname=${KEYCLOAK_SVC_HOSTNAME:-kc.odl.local} --hostname-strict=false --hostname-debug=true --https-port=7443 --https-certificate-file=/etc/x509/https/tls.crt --https-certificate-key-file=/etc/x509/https/tls.key --http-enabled=true --http-port=7080 --config-keystore=/etc/keycloak-store --config-keystore-password=${KEYCLOAK_SVC_KEYSTORE_PASSWORD} --db=postgres --db-url-database=keycloak --db-url-host=uedb --db-schema=public --db-password=${POSTGRES_PASSWORD:-postgres} --db-username=postgres volumes: - keycloak-store:/etc/keycloak-store - ./config/keycloak/tls:/etc/x509/https