dockerize deamons with docker compose

This commit is contained in:
napoly 2022-11-18 20:47:07 +01:00 committed by woodser
parent f11c816cda
commit 217e7e03a2
4 changed files with 15 additions and 14 deletions

View File

@ -1,11 +1,11 @@
<div align="center">
<div align="center">
<img src="https://raw.githubusercontent.com/haveno-dex/haveno-meta/721e52919b28b44d12b6e1e5dac57265f1c05cda/logo/haveno_logo_landscape.svg" alt="Haveno logo">
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/505405b43cb74d5a996f106a3371588e)](https://app.codacy.com/gh/haveno-dex/haveno/dashboard)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/haveno-dex/haveno/CI)
[![GitHub issues with bounty](https://img.shields.io/github/issues-search/haveno-dex/haveno?color=%23fef2c0&label=Issues%20with%20bounties&query=project%3Ahaveno-dex%2F2)](https://github.com/orgs/haveno-dex/projects/2) |
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/haveno-dex/haveno/build.yml?branch=master)
[![GitHub issues with bounty](https://img.shields.io/github/issues-search/haveno-dex/haveno?color=%23fef2c0&label=Issues%20with%20bounties&query=project%3Ahaveno-dex%2F2)](https://github.com/orgs/haveno-dex/projects/2) |
[![Twitter Follow](https://img.shields.io/twitter/follow/HavenoDEX?style=social)](https://twitter.com/havenodex)
[![Matrix rooms](https://img.shields.io/badge/Matrix%20room-%23haveno-blue)](https://matrix.to/#/#haveno:monero.social) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/haveno-dex/.github/blob/master/CODE_OF_CONDUCT.md)
[![Matrix rooms](https://img.shields.io/badge/Matrix%20room-%23haveno-blue)](https://matrix.to/#/#haveno:monero.social) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/haveno-dex/.github/blob/master/CODE_OF_CONDUCT.md)
</div>
## What is Haveno?
@ -83,4 +83,4 @@ If you are using a wallet that supports OpenAlias (like the 'official' CLI and G
`1AKq3CE1yBAnxGmHXbNFfNYStcByNDc5gQ`
<!-- ![Qr code](https://raw.githubusercontent.com/haveno-dex/haveno/master/media/qrbtc.png) -->
<!-- ![Qr code](https://raw.githubusercontent.com/haveno-dex/haveno/master/media/qrbtc.png) -->

View File

@ -92,14 +92,14 @@ public class CoreAccountService {
if (accountExists()) throw new IllegalStateException("Cannot create account if account already exists");
keyRing.generateKeys(password);
this.password = password;
for (AccountServiceListener listener : listeners) listener.onAccountCreated();
for (AccountServiceListener listener : new ArrayList<AccountServiceListener>(listeners)) listener.onAccountCreated();
}
public void openAccount(String password) throws IncorrectPasswordException {
if (!accountExists()) throw new IllegalStateException("Cannot open account if account does not exist");
if (keyRing.unlockKeys(password, false)) {
this.password = password;
for (AccountServiceListener listener : listeners) listener.onAccountOpened();
for (AccountServiceListener listener : new ArrayList<AccountServiceListener>(listeners)) listener.onAccountOpened();
} else {
throw new IllegalStateException("keyRing.unlockKeys() returned false, that should never happen");
}
@ -110,13 +110,13 @@ public class CoreAccountService {
String oldPassword = this.password;
keyStorage.saveKeyRing(keyRing, oldPassword, password);
this.password = password;
for (AccountServiceListener listener : listeners) listener.onPasswordChanged(oldPassword, password);
for (AccountServiceListener listener : new ArrayList<AccountServiceListener>(listeners)) listener.onPasswordChanged(oldPassword, password);
}
public void closeAccount() {
if (!isAccountOpen()) throw new IllegalStateException("Cannot close unopened account");
keyRing.lockKeys(); // closed account means the keys are locked
for (AccountServiceListener listener : listeners) listener.onAccountClosed();
for (AccountServiceListener listener : new ArrayList<AccountServiceListener>(listeners)) listener.onAccountClosed();
}
public void backupAccount(int bufferSize, Consumer<InputStream> consume, Consumer<Exception> error) {

View File

@ -23,7 +23,6 @@ import com.google.inject.Inject;
import javax.inject.Named;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@ -35,7 +34,7 @@ import javax.annotation.Nullable;
@Slf4j
public class ProvidersRepository {
private static final List<String> DEFAULT_NODES = Arrays.asList(
private static final List<String> DEFAULT_NODES = List.of(
"http://gbmks3wzvdzu5xq6gnqpj2qz3262tcr36iltagk37udcbwzsbfazq3yd.onion/" // Haveno
);
@ -104,8 +103,8 @@ public class ProvidersRepository {
if (useLocalhostForP2P) {
// If we run in localhost mode we don't have the tor node running, so we need a clearnet host
// Use localhost for using a locally running provider
// providers = Collections.singletonList("http://localhost:8078");
providers = Collections.singletonList("https://price.haveno.network/"); // Haveno
providers = List.of("http://localhost:8078/", "https://price.haveno.network/");
} else {
providers = DEFAULT_NODES;
}

View File

@ -8,7 +8,7 @@ On Ubuntu: `sudo apt install make wget git openjdk-11-jdk`. The Monero binaries
## Build Haveno
If it's the first time you are building Haveno, run the following commands to download the repository, the needed dependencies, and build the latest release:
If it's the first time you are building Haveno, run the following commands to download the repository, the needed dependencies, and build the latest release:
```
git clone https://github.com/haveno-dex/haveno.git
@ -68,6 +68,8 @@ If you don't use *screen*, open 4 terminal windows and run in each one of them:
1. `make seednode-local`
2. `make user1-desktop-local` or if you want to run user1 as a daemon: `make user1-daemon-local`
3. `make user2-desktop-local` or if you want to run user2 as a daemon: `make user2-daemon-local`
4. `make arbitrator-desktop-local` or if you want to run arbitrator as a daemon: `make arbitrator-daemon-local`
5. Optionally run a [local price node](https://github.com/haveno-dex/haveno-pricenode/blob/main/README.md)
If this is the first time launching the arbitrator desktop application, register the arbitrator after the interface opens. Go to the *Account* tab and press `cmd+r`. Confirm the registration of the arbitrator.