Skip to content

Commit

Permalink
Merge #14: Correct Docker instruction, and add a simple usage guide i…
Browse files Browse the repository at this point in the history
…n the README

57beef0 CONTRIBUTING: add the instructions to run the tests with docker (Antoine Poinsot)
0f3c35f Correct Docker instruction, and add a simple usage guide in the README (Antoine Poinsot)

Pull request description:

  No need for docker-compose, just a one liner to skip the annoying Postgre setup

ACKs for top commit:
  danielabrozzoni:
    ACK 57beef0

Tree-SHA512: 57dcd6b3395003c94bcafb6d57aa9f8e6eaa2247350aa8cc5096b3a1f9d305427a0b48e5634ed5c5f6aeeae94dfca83a4419d3da767a2501ccf213adcc1299c2
  • Loading branch information
darosior committed Apr 17, 2021
2 parents 474040a + 57beef0 commit dbed40a
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 85 deletions.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ be reviewed first on the conceptual level before focusing on code style or gramm
fixes.


# Running the tests

We test message processing against Postgre. Therefore the tests need a running instance
of Postgre to connect to, `postgresql://revault:revault@localhost/coordinator_db`. The easiest
way to set one up is by using docker:
```
docker run --rm -d -p 5432:5432 --name postgres-coordinatord -e POSTGRES_PASSWORD=revault -e POSTGRES_USER=revault -e POSTGRES_DB=coordinator_db postgres:alpine
cargo test
```


# Style

To avoid endless bikeshedding, just use [`rustfmt`](https://github.com/rust-lang/rustfmt).
Expand Down
12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ initially configured on the Coordinator.
**The coordinator is never trusted with funds, it is just a convenient mean to replace
direct connections between participants.**

## Usage

The coordinator will need access to a PostgreSQL database, set in the configuration file as:
```
postgres_uri = "postgresql://user:password@localhost:5432/database_name"
```

An easy way to try it out without having to configure Postgres on your system is by using Docker:
```
docker run --rm -d -p 5432:5432 --name postgres-coordinatord -e POSTGRES_PASSWORD=revault -e POSTGRES_USER=revault -e POSTGRES_DB=coordinator_db postgres:alpine
cargo run -- --conf contrib/config.toml
```

For a more complete guide for setting up a demo Revault deployment, check out the tutorial in
[`revaultd`'s repository](https://github.com/revault/revaultd/)!


## Contributing

Any contribution of any form (patches, bug reports, documentation, thoughts) is very
Expand Down
10 changes: 10 additions & 0 deletions contrib/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
daemon = false
data_dir = "./revault_coordinatord"
log_level = "debug"

postgres_uri = "postgresql://revault:revault@localhost:5432/coordinator_db"

# Add your own keys there
managers = []
stakeholders = []
watchtowers = []
18 changes: 0 additions & 18 deletions docker/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions docker/config.toml

This file was deleted.

32 changes: 0 additions & 32 deletions docker/docker-compose.yml

This file was deleted.

13 changes: 0 additions & 13 deletions docker/entrypoint.sh

This file was deleted.

0 comments on commit dbed40a

Please sign in to comment.