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

Update docker config to use docker networking instead of host networking #312

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Stop Mono service
run: sudo killall mono

- name: Fix permissions
run: mkdir docker/data && sudo chown -R 101:102 docker/data

- name: Start containers
run: docker compose -f "./docker/docker-compose.yml" up -d --build

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ yarn-error.log*

# generated code
/src/protobuf/**

# docker data
docker/data
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,19 @@ You first need to start a local Haveno network which can be done manually or usi

### Start local Haveno network manually

This workflow is useful for local development of `haveno` and `haveno-ts`

1. [Run a local Haveno test network](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md) and then shut down the arbitrator, user1, and user2 or run them as daemons, e.g. `make user1-daemon-local`. You may omit the arbitrator registration steps since it's done automatically in the tests.
2. Clone this project to the same parent directory as the haveno project: `git clone https://github.com/haveno-dex/haveno-ts`
3. Install [Docker 4.26.1](https://docs.docker.com/desktop/release-notes/#4261).
4. In a new terminal, start envoy with the config in haveno-ts/config/envoy.test.yaml.<br>For example (change absolute path for your system): `docker run --network host --rm --add-host host.docker.internal:host-gateway -it -v ~/git/haveno-ts/config/envoy.test.yaml:/envoy.test.yaml -p 8079:8079 -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 8084:8084 -p 8085:8085 -p 8086:8086 envoyproxy/envoy-dev:latest -c /envoy.test.yaml`
3. Install `envoy` proxy from your package manager of choice.
4. In a new terminal, start envoy with the config in haveno-ts/config/envoy.local.yaml: `envoy -c config/envoy.local.yaml`
5. In a new terminal, start the funding wallet. This wallet will be funded automatically in order to fund the tests.<br>For example: `cd ~/git/haveno && make funding-wallet-local`.

### Start local Haveno network with docker

Alternatively, start a local Haveno network with docker:
Alternatively use this wokflow to develop `haveno-ts` or run tests with dockerized setup:

Start a local Haveno network with docker:

1. Install [Docker 4.26.1](https://docs.docker.com/desktop/release-notes/#4261).
2. `cd ~/git/haveno-ts/docker`
Expand Down
458 changes: 458 additions & 0 deletions config/envoy.local.yaml

Large diffs are not rendered by default.

Loading
Loading