https://github.com/dedis/d-voting
📧 E-Voting platform based on the Dela blockchain
https://github.com/dedis/d-voting
blockchain e-voting
Last synced: 5 months ago
JSON representation
📧 E-Voting platform based on the Dela blockchain
- Host: GitHub
- URL: https://github.com/dedis/d-voting
- Owner: dedis
- License: bsd-3-clause
- Created: 2021-06-10T11:26:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-10T13:12:33.000Z (6 months ago)
- Last Synced: 2024-12-10T14:27:16.390Z (6 months ago)
- Topics: blockchain, e-voting
- Language: Go
- Homepage: https://dedis.github.io/d-voting
- Size: 14.1 MB
- Stars: 18
- Watchers: 7
- Forks: 7
- Open Issues: 75
-
Metadata Files:
- Readme: README.docker.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# D-Voting/DELA setup w/ Docker Compose
## Overview
The files related to the Docker environment can be found in
* `docker-compose/` (Docker Compose files)
* `Dockerfiles/` (Dockerfiles)
* `scripts/` (helper scripts)You also need to either create a `.env` file in the project's root
or point to another environment file using the `--env-file` flag
when running `docker compose`.The environment file needs to contain
```
DELA_NODE_URL=http://172.19.44.254:8080
DATABASE_USERNAME=dvoting
DATABASE_PASSWORD=XXX # choose any PostgreSQL password
DATABASE_HOST=db
DATABASE_PORT=5432
DB_PATH=dvoting # LMDB database path
FRONT_END_URL=http://127.0.0.1:3000
BACKEND_HOST=backend
BACKEND_PORT=5000
SESSION_SECRET=XXX # choose any secret
PUBLIC_KEY=XXX # public key of pre-generated key pair
PRIVATE_KEY=XXX # private key of pre-generated key pair
PROXYPORT=8080
NODEPORT=2000 # DELA node port
```There are two Docker Compose file you may use:
* `docker-compose/docker-compose.yml` for the currently released version, or
* `docker-compose/docker-compose.debug.yml` for the development/debugging versionYou can either run
```
export COMPOSE_FILE=
```or pass the `-f/--file ` argument to choose between
the files.Using the currently released version will pull the images from the GitHub container registry.
If you instead use the development/debugging version the images will be build locally and you can debug your developments.
Run
```
docker compose up
```(possibly with the `-f/--file` argument) to set up the environment.
/!\ Any subsequent `docker compose` commands must be run with `COMPOSE_FILE` being
set to the Docker Compose file that defines the current environment.Use
```
docker compose down
```to shut off, and
```
docker compose down -v
```to delete the volumes and reset your instance.
## Post-install commands
To set up the DELA network, go to `scripts/` and run
```
./init_dela.sh
```/!\ This script uses `docker compose` as well, so make sure that the `COMPOSE_FILE` variable is
set to the right value.To set up the permissions, run
```
docker compose exec backend npx cli addAdmin --sciper XXX
docker compose down && docker compose up -d
```to add yourself as admin and clear the cached permissions.