Advanced configuration options
Developer guide for running the Credential Service
docker compose -f docker/no-external-db/docker-compose-no-db.yml up --detach
This standalone service uses an in-memory database with no persistence, and therefore is recommended only if you're managing key/secret storage separately.
Construct the postgres URL and configure the env variables mentioned above.
POSTGRES_USER: Username for Postgres database
POSTGRES_PASSWORD: Password for Postgres database
POSTGRES_MULTIPLE_DATABASES: Database names for multiple databases in the same cluster, e.g.:
"app,logto". This sets up multiple databases in the same cluster, which can be used independently for External Veramo KMS or LogTo service.
Then, make the Postgres initialisation scripts executable:
chmod +x docker/with-external-db/pg-init-scripts/create-multiple-postgresql-databases.sh
Then, run the LogTo service to configure the LogTo application API resources, applications, sign-in experiences, roles etc using Docker Compose:
docker compose -f docker/with-external-db/docker-compose-with-db.yml --profile logto up --detach
Configure the environment variables in the
with-db.envfile with the settings described in section above. Depending on whether you are using external Veramo KMS only, LogTo only, or both you will need to have previously provisioned these services as there are environment variables in this file that originate from Postgres/LogTo.
Then, start the service using Docker Compose:
docker compose -f docker/with-external-db/docker-compose-with-db.yml up --detach
When upgrading either the external Veramo KMS or LogTo, you might need to run migrations for the underlying databases.
For example, to run Credential Service app migrations on an existing Postgres database (for external Veramo KMS):
docker compose -f docker/with-external-db/docker-compose-with-db.yml --profile app-setup up --detach
Or to run LogTo migrations on an existing Postgres database:
docker compose -f docker/with-external-db/docker-compose-with-db.yml --profile logto-setup up --detach
docker build --file docker/Dockerfile --target runner . --tag credential-service:local