Skip to content

Commit

Permalink
Merge pull request #151 from filecoin-project/feat/github_modify_readme
Browse files Browse the repository at this point in the history
modify backend readme
  • Loading branch information
hexianglinss authored Oct 22, 2024
2 parents 0d3fbb8 + 6a2d26a commit 8207388
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
24 changes: 19 additions & 5 deletions powervoting-backend/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,35 @@ Clone the PowerVoting backend repository with the repository branch set to `main
git clone https://github.com/filecoin-project/on-chain-voting.git
```

#### 5. Modify the Configuration File
#### 5. Obtain your proofs to upload w3storage

Install w3 cli and generate your did,create a space,delegate capabilities to your did,save the generated ucan file above.

```
npm install -g @web3-storage/w3cli
w3 key create
w3 space create [NAME]
w3 delegation create -c 'store/*' -c 'upload/*' [DID] -o proof.ucan
```

#### 6. Modify the Configuration File

Edit the `configuration.yaml` file as needed for your environment.

![Edit Configuration](img/1.png)

#### 6. Install Dependencies
#### 7. Install Dependencies

Run the following command to tidy Go modules and install dependencies:

```
go mod tidy
```

#### 7. Build the Docker Image
#### 8. Build the Docker Image

Build the Docker image for the PowerVoting backend:

Expand All @@ -48,7 +62,7 @@ docker build -t powervoting .

![Building Docker Image](img/2.png)

#### 8. Run the Docker Image
#### 9. Run the Docker Image

Run the Docker image, mapping port 9999 of the container to port 9999 of the host, in detached mode:

Expand All @@ -58,7 +72,7 @@ docker run -p 9999:9999 -d powervoting

![Running Docker Image](img/3.png)

#### 9. View Logs
#### 10. View Logs

To monitor the logs of the running container, you can use the Docker logs command:

Expand Down
1 change: 1 addition & 0 deletions powervoting-backend/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ network:
w3client:
did:
privateKey:
# proof.ucan path
proof:
Binary file modified powervoting-backend/img/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file removed powervoting-backend/proof.ucan
Empty file.
14 changes: 0 additions & 14 deletions powervoting-backend/w3.txt

This file was deleted.

0 comments on commit 8207388

Please sign in to comment.