Skip to content
Merged
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
11 changes: 11 additions & 0 deletions DeveloperSetupGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,17 @@ docker compose -f docker-compose-dev.yml build --no-cache --pull [<service_name1
docker compose -f docker-compose-dev.yml up --force-recreate [<service_name1> <service_name2> ...]
```

After a Node or dependency upgrade, an existing `node_modules` volume can keep old dependencies even after a clean image build. Remove only the dependency volume for the affected service. For example, for REMS Admin, identify the exact Compose-managed volume and confirm its project before removing the container and volume:

```bash
docker volume ls --filter label=com.docker.compose.volume=rems_dev_rems-admin-nodeModules
docker compose -f docker-compose-dev.yml rm --stop --force rems-administrator
docker volume rm "$dependency_volume" # Set this to the exact volume name listed above.
docker compose -f docker-compose-dev.yml build --no-cache --pull rems-administrator
```

Reserve `docker compose -f docker-compose-dev.yml down -v` for a disposable stack. It removes Compose-managed volumes, including the local Keycloak and MongoDB data. If you also need to reset the external file-sync volumes, run `docker-sync clean` before rebuilding.

After rebuilding images and containers, start docker-sync normally.

You may need to first type <kbd>Control-C</kbd> to stop running the `docker-compose up` command (containers running
Expand Down
6 changes: 4 additions & 2 deletions EnvironmentVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ Request Generator defaults to direct PPA lookup with locator mode enabled (`VITE
- `COMPOSE_PROJECT_NAME`
- docker-compose.yml, docker-compose-dev.yml, docker-compose-local-build.yml
- keycloak
- `KEYCLOAK_ADMIN`
- `KEYCLOAK_ADMIN_PASSWORD`
- `KEYCLOAK_ADMIN` and `KEYCLOAK_ADMIN_PASSWORD` set the first administrator for the prebuilt Keycloak 22 image in `docker-compose.yml`.
- `KC_BOOTSTRAP_ADMIN_USERNAME` and `KC_BOOTSTRAP_ADMIN_PASSWORD` set the first administrator for the Keycloak 26 image built by the dev and local-build Compose files.
- `DB_VENDOR`
- `KEYCLOAK_REGISTRY` selects the base image registry when the dev or local-build Compose file builds Keycloak.
- `MAVEN_REPO` supplies the repository for the two patched JARs during that build and defaults to Maven Central. MITRE developers can export their internal Artifactory Maven proxy as `MAVEN_REPO`.
- test-ehr
- `oauth_token`
- request-generator
Expand Down
7 changes: 5 additions & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ services:
ports:
- '8180:8080'
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
- DB_VENDOR=h2
volumes:
- rems_dev_keycloak-data:/opt/keycloak/data/
- '../test-ehr/src/main/resources/ClientFhirServerRealm.json:/opt/keycloak/data/import/ClientFhirServerRealm.json'
build:
context: ../test-ehr
dockerfile: Dockerfile.keycloak
args:
KEYCLOAK_REGISTRY: ${KEYCLOAK_REGISTRY:-artifacts.mitre.org/docker}
MAVEN_REPO: ${MAVEN_REPO:-https://artifacts.mitre.org/artifactory/java}

test-ehr:
container_name: rems_dev_test-ehr
Expand Down
7 changes: 5 additions & 2 deletions docker-compose-local-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ services:
ports:
- '8180:8080'
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
- DB_VENDOR=h2
volumes:
- rems_dev_keycloak-data:/opt/keycloak/data/
- '../test-ehr/src/main/resources/ClientFhirServerRealm.json:/opt/keycloak/data/import/ClientFhirServerRealm.json'
build:
context: ../test-ehr
dockerfile: Dockerfile.keycloak
args:
KEYCLOAK_REGISTRY: ${KEYCLOAK_REGISTRY:-artifacts.mitre.org/docker}
MAVEN_REPO: ${MAVEN_REPO:-https://artifacts.mitre.org/artifactory/java}

test-ehr:
container_name: rems_dev_test-ehr
Expand Down
Loading