-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #389 from c4dt/main
Merge C4DT's developments into C4DT branch
- Loading branch information
Showing
277 changed files
with
8,163 additions
and
3,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This is an example .env file with default passwords and private keys. | ||
# Do not use this in production or with any public-facing ports! | ||
BACKEND_HOST=backend # name of the 'backend' container | ||
BACKEND_PORT=5000 # port of the 'backend' container | ||
COMPOSE_FILE=./docker-compose/docker-compose.yml # Docker Compose configuration file to use | ||
DATABASE_HOST=db # name of the PostgreSQL container | ||
DATABASE_PASSWORD=Ohw0phoa # choose any PostgreSQL password | ||
DATABASE_PORT=5432 # port of the PostgreSQL container | ||
DATABASE_USERNAME=dvoting | ||
DB_PATH=dvoting # LMDB database path | ||
DELA_PROXY_URL=http://172.19.44.254:8080 # IP and port of one of the DELA containers | ||
FRONT_END_URL=http://127.0.0.1:3000 # the automated frontend tests expect this value do not change it | ||
NODEPORT=2000 # DELA node port | ||
# For public-facing services and production, this key needs to be changed! | ||
PRIVATE_KEY=6aadf480d068ac896330b726802abd0da2a5f3824f791fe8dbd4cd555e80b809 | ||
PROXYPORT=8080 # DELA proxy port | ||
PUBLIC_KEY=3e5fcaed4c5d79a8eccceeb087ee0a13b8f91d917ed62017a9cd28e13b228389 | ||
REACT_APP_DEV_LOGIN=true # debugging admin login /!\ disable in production /!\ | ||
REACT_APP_RANDOMIZE_VOTE_ID=true # randomize voter ID for debugging /!\ disable in production /!\ | ||
REACT_APP_SCIPER_ADMIN=123456 # debugging admin ID /!\ disable in production /!\ | ||
REACT_APP_BLOCKLIST= # comma-separad form IDs to hide from non-admin users | ||
SESSION_SECRET=kaibaaF9 # choose any secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
Thank you for opening a pull request with this project, please also: | ||
|
||
* [ ] add a brief description of your changes here | ||
* [ ] assign a reviewer | ||
* [ ] assign the PR to yourself, or to the person(s) working on it | ||
* [ ] start in `draft` mode and `in progress` pipeline in the project (if applicable) | ||
* [ ] once it's ready put it in the `Review` or `Ready4Merge` pipeline in the project (if applicable) and remove `draft` | ||
* [ ] if applicable, add this PR to its related issue by one of the special keywords (https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue) | ||
* [ ] if applicable, add this PR to its related issue by one of the special keywords [Closing keywords](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue) | ||
* once it's ready | ||
* [ ] put it in the `Review` or `Ready4Merge` pipeline in the project (if applicable) | ||
* [ ] remove `draft` | ||
* [ ] assign a reviewer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
FROM golang:1.20.6-bookworm AS base | ||
RUN apt-get update && apt-get install git | ||
# make sure we're using the same head as d-voting | ||
RUN git clone https://github.com/c4dt/dela.git | ||
WORKDIR /go/dela/cli/crypto | ||
RUN go install | ||
RUN apt-get update -y && apt-get install -y git | ||
WORKDIR /go/d-voting | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
COPY . . | ||
|
||
FROM base AS build | ||
COPY --from=base /go/dela . | ||
COPY --from=base /go/d-voting . | ||
ENV GOCACHE=/root/.cache/go-build | ||
WORKDIR /go/d-voting/cli/dvoting | ||
RUN go build | ||
ENV PATH=/go/dela/cli/crypto:/go/d-voting/cli/dvoting:${PATH} | ||
RUN --mount=type=cache,target="/root/.cache/go-build" go install | ||
# make sure we're using the same head as d-voting | ||
RUN --mount=type=cache,target="/root/.cache/go-build" cd $( go list -f '{{.Dir}}' go.dedis.ch/dela )/cli/crypto && go install | ||
|
||
FROM golang:1.20.6-bookworm AS build | ||
WORKDIR /usr/local/bin | ||
COPY --from=base /go/bin/crypto . | ||
COPY --from=base /go/bin/dvoting . | ||
ENTRYPOINT ["/bin/bash", "-c", "dvoting --config /data/node start --postinstall --proxyaddr :$PROXYPORT --proxykey $PROXYKEY --listen tcp://0.0.0.0:2000 --public $PUBLIC_URL --routing tree --noTLS"] | ||
CMD [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.