diff --git a/.gitignore b/.gitignore index 93b8de6cb..cc293eb45 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ target/ ### Other files ### .env -docker-compose.local.yml docker-compose-otc.local.yml docker-compose.legacy.yml diff --git a/README.md b/README.md index e80064a0a..ab7045490 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@


- Opex + Opex

@@ -22,14 +22,15 @@ microservice project work as a vanilla core for running cryptocurrency exchanges - - + +

## Contents - [Build and Run](#build-and-run) +- [Environment Variables](#environment-variables) - [Live Demo](#live-demo) - [Architecture Overview](#overview) - [How to Contribute](#how-to-contribute) @@ -41,13 +42,56 @@ You need to have [Maven](https://maven.apache.org) and [Docker](https://www.dock 1. Clone the repository `git clone https://github.com/opexdev/core.git` 1. Run `cd core` +1. You will need to create and add the following [Environment Variables](#environment-variables) to the `.env` file located in the root of your project 1. Run `mvn clean install` command. -1. Run `docker-compose up --build`. +1. Run `docker compose -f .\docker-compose.yml -f .\docker-compose.override.yml -f .\docker-compose.build.yml -f .\docker-compose.local.yml up -d --build`. 1. Run `docker ps` to see if every service is running. + +## Environment Variables +``` +APP_NAME=Opex-local + +APP_BASE_URL=localhost:8080 + +PANEL_PASS=admin + +BACKEND_USER=admin + +SMTP_PASS=x + +OPEX_ADMIN_KEYCLOAK_CLIENT_SECRET=x + +API_KEY_CLIENT_SECRET=x + +KEYCLOAK_FRONTEND_URL=http://localhost:8083/auth + +KEYCLOAK_ADMIN_URL=http://localhost:8083/auth + +KEYCLOAK_VERIFY_REDIRECT_URL=http://localhost:8080/verify + +KEYCLOAK_FORGOT_REDIRECT_URL=http://localhost:8080/forgot + +PREFERENCES=preferences.yml + +WHITELIST_REGISTER_ENABLED=true + +WHITELIST_LOGIN_ENABLED=true + +WALLET_BACKUP_ENABLED=false + +TAG=debug +``` +| Variable | Description | +| :-------- | :------------------------- | +| SMTP_PASS | An SMTP password is a password used to access an email account's | +| OPEX_ADMIN_KEYCLOAK_CLIENT_SECRET | Ignore this | +| API_KEY_CLIENT_SECRET |(Please do this after starting the project, then rebuild and run the process again.)
1. Go to http://localhost:8083/auth/admin/master/console/#/realms/opex/clients
2. Click on Opex-api-key
3. In the Credentials section, click on Regenerate Secret
4. Copy the generated secret and paste it into this section | +| PREFERENCES | For the initialization | + ## Live Demo -Deployed at [demo.opex.dev](https://demo.opex.dev). +Deployed at [app.opex.dev](https://app.opex.dev). ## Architecture Overview diff --git a/docker-compose.local.yml b/docker-compose.local.yml new file mode 100644 index 000000000..e9c9f0431 --- /dev/null +++ b/docker-compose.local.yml @@ -0,0 +1,62 @@ +version: '3.8' +services: + zookeeper: + user: "root" + kafka-1: + user: "root" + kafka-2: + user: "root" + kafka-3: + user: "root" + vault: + ports: + - "8200:8200" + consul: + ports: + - "8500:8500" + - "8300:8300" + - "8600:8600" + redis: + ports: + - "6379:6379" + redis-cache: + ports: + - "6380:6379" + akhq: + ports: + - "127.0.0.1:10100:8080" + accountant: + ports: + - "127.0.0.1:8089:8080" + - "127.0.0.1:1045:5005" + eventlog: + ports: + - "127.0.0.1:8090:8080" + matching-engine: + ports: + - "127.0.0.1:8092:8080" + - "127.0.0.1:1046:5005" + matching-gateway: + ports: + - "127.0.0.1:8093:8080" + - "127.0.0.1:1047:5005" + auth: + ports: + - "127.0.0.1:8083:8080" + - "127.0.0.1:1048:5005" + wallet: + ports: + - "127.0.0.1:8091:8080" + - "127.0.0.1:1049:5005" + market: + ports: + - "127.0.0.1:8096:8080" + - "127.0.0.1:1056:5005" + api: + ports: + - "127.0.0.1:8094:8080" + - "127.0.0.1:1050:5005" + bc-gateway: + ports: + - "0.0.0.0:8095:8080" + - "127.0.0.1:1052:5005"