Skip to content

Commit

Permalink
docs: minor readme + compose updates (#174)
Browse files Browse the repository at this point in the history
* docs: minor readme + compose updates

* note COMPOSE_PROFILES
  • Loading branch information
ChristopherChudzicki authored Nov 25, 2024
1 parent a75fb53 commit 4421abf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion README-keycloak.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<root url>/api/schema/swagger-ui/`
You can interact with the API directly through the Swagger interface: `<root url>/api/v0/schema/swagger-ui/`

The system also exposes a Redoc version of the API at `<root url>/api/schema/redoc/`
The system also exposes a Redoc version of the API at `<root url>/api/v0/schema/redoc/`

Navigating to an API endpoint in the browser should also get you the normal DRF interface as well.

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4421abf

Please sign in to comment.