@@ -64,6 +64,7 @@ And a scenario for using Verifiable Credential(s) For OID4VP flow:
6464![ OID4VP flow] ( http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/Sphereon-Opensource/OID4VC-demo/develop/documents/oid4vp-flow.puml )
6565
6666# Step by Step instructions
67+
6768In the next chapters we're going to show you how to setup the ` agent ` module, oid4vci-demo-front-end and a brief
6869introduction on how credential branding actually works.
6970
@@ -73,28 +74,62 @@ introduction on how credential branding actually works.
7374
7475### Docker
7576
76- From the root folder run:
77+ We maintain Docker a setup for building and testing in directory ` docker/compose/build ` .
78+ We have created a script to install and patch the agent configurations for you required to build and run the Docker
79+ containers.
80+ It's located here: ` docker/compose/build/install-configs.sh <ecosystem> <agent host address> ` .
81+ ** IMPORTANT:** The host address should be either a DNS host or a LAN IP that is reachable for your mobile devices running SSI wallet
82+ software. For example:
7783
7884``` bash
79- docker-compose build
80- docker-compose up
85+ install-configs.sh sphereon http://192.168.1.100:5000
8186```
8287
83- The build phase might take a few minutes. If you run the docker-compose up command 3 services will be running. The
84- ssi-agent, oid4vci-demo-frontend and oid4vp-frontend.
88+ The install-configs.sh script will set up the environment for your containers using the .env.examples files from
89+ packages/ ** src/.env.example and put them in the directories under ` docker/compose/build ` :
8590
86- You should now be able to go to http://host.docker.internal:5001 and http://host.docker.internal:5002 respectively to
87- test the issuer and verifier demo's.
91+ ```
92+ oid4vci-demo-frontend/.env.local
93+ oid4vp-demo-frontend/.env.local
94+ agent/.env.local
95+ ```
8896
89- Please note that you might have to configure your docker environment to expose the host.docker.internal like the image
90- below. If you cannot make that work you could adjust the config/docker and docker/* .env files to suit your needs
97+ (The .env.local files are copied and patched from the packages/** /src/.env.example files)
9198
99+ Please ensure that you execute the script and docker compose commands with ./docker/compose/build as working directory
100+ and have correctly set up your environment
101+ variables as outlined in the documentation for [ Setting up the agent] ( ./documents/agent-setup.md )
102+ and [ Setting up the VCI frontend] ( ./documents/vci-front-end.md ) .
103+
104+ The current example for ecosystem "sphereon" loads the folder ` packages/agent/conf/demos/sphereon ` as your base
105+ configuration folder.
106+ All ecosystems present in packages/agent/conf/demos can be installed using the install-configs.sh script.
107+
108+ To build and run the Docker containers, execute the following commands from within the respective directory:
109+
110+ ``` bash
111+ docker compose build # This builds the Docker images
112+ docker compose up -d # This starts the Docker containers, this will require the .env & config files to be installed
113+ ```
114+
115+ The building process may take a few minutes. Once you execute the docker compose up command, three services will start:
116+ ssi-agent, oid4vci-demo-frontend, and oid4vp-frontend.
117+
118+ You should now be able to go to http://localhost:5001 and http://localhost:5002 respectively to test the issuer and
119+ verifier demo's.
120+
121+ Please note that you might have to configure your docker environment to expose the host.docker.internal like the image
122+ below. If you cannot make that work you could adjust the config/docker and docker/compose/build/** /.env* files to suit
123+ your needs.
92124<img src =" resources/docker_settings.png " width =" 500 " />
93125
94- #### Environment variables and configuration for docker.
126+ To build the images without docker-compose you can also just use "docker build" in the project root directory with some
127+ parameters:
128+
129+ ``` shell
130+ docker build -f ./docker/Dockerfile -t oid4vc-demo-ssi-agent:latest --build-arg=" PACKAGE_PATH=packages/agent" --build-arg=" NODE_SCRIPT=start:dev" .
131+ docker build -f ./docker/Dockerfile -t oid4vci-demo-frontend:latest --build-arg=" PACKAGE_PATH=packages/oid4vci-demo-frontend" --build-arg=" NODE_SCRIPT=start:prod" .
132+ docker build -f ./docker/Dockerfile -t oid4vp-demo-frontend:latest --build-arg=" PACKAGE_PATH=packages/oid4vp-demo-frontend" --build-arg=" NODE_SCRIPT=start:prod" .
133+ ```
95134
96- Please note that the environment variables for the 3 images come from the ./docker folder. You will have to copy the 3
97- example files and remove the .example suffix.
98135
99- The configuration files are copied over to the agent image. So the above explained configuration options also apply when
100- running in docker.
0 commit comments