Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved README instructions for running the demos locally #8

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@

This project is the combination of all demos hosted on https://privacybydesign.foundation/demo/.

### Preliminaries
Make sure you have an [IRMA server](https://irma.app/docs/irma-server/) running. This project needs one to handle its IRMA sessions.

### Install
* Run `composer install`
* Run `yarn install`
* Set IRMA server URL and API token of the IRMA server of your choice in `config.php`.
* Follow the instructions in `data`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: instructions in data are still needed when using JWTs. I should add that.

* Run ./build_artifacts.sh
* Run `composer install` (or `docker run --rm -v ${PWD}:/src --workdir /src composer install` if you haven't installed PHP)
* Run `yarn install` (or `docker run --rm -v ${PWD}:/src --workdir /src node yarn install` if you haven't installed Node.js)
* Set the IRMA server URL of the IRMA server of your choice in `config.php`.
The default settings are set for an `irma server` running on localhost. If you want to run this demo using Docker Desktop (see below), you should replace localhost with the IP of your computer. The API token can remain empty in local setups.
* Run `./build_artifacts.sh`

### Running
Copy the files in the `build` directory to your Apache's `/var/www/html` directory or run using the following Docker command.

docker run --rm -v ${PWD}/build:/var/www/html -p 8080:80 php:8.0-apache

For example, you can then find the '18 plus' demo on `http://localhost:8080/en/18plus`.

### Adding a new demo
Example when adding a demo called new-demo:
Expand Down