Skip to content

Commit

Permalink
Test Environment for wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
procivisAG committed Nov 8, 2023
1 parent 0ada9e3 commit 8a94600
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ args = ["build", "-p", "core-server"]
command = "cargo"
args = ["run", "-p", "core-server"]

[tasks.runwallet]
command = "cargo"
env = { "SERVER_PORT" = "3001", "DATABASE_URL" = "mysql://core:886eOqVMmlHsayu6Vyxw@localhost:3307/core", "CORE_BASE_URL"="http://0.0.0.0:3001" }
args = ["run", "-p", "core-server"]

[tasks.runw]
command = "cargo"
args = ["watch", "--ignore", "*.md", "--ignore", "*.yaml", "--ignore", "*.yml", "--exec", "make run"]
Expand All @@ -39,6 +44,7 @@ args = ["-f", "docker/db.yml", "down"]
[tasks.dbdrop]
script = [
"docker rm --force docker-mariadb-1",
"docker rm --force docker-walletdb-1",
"docker volume rm docker_mariadb_data",
]

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ makers run

We can use `Makefile.toml` to add and fine tune build/run targets later in the project.

## Run Wallet

You can start a separate instance of a service that will play wallet role. This instance is accessible on port 3001.

```shell
makers runwallet
```

### Live Reload

Using `cargo-watch`, the code can be automatically recompiled when changes are made.
Expand Down
13 changes: 13 additions & 0 deletions docker/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,18 @@ services:
MYSQL_DATABASE: core
restart: on-failure

walletdb:
image: mariadb:10.9
ports:
- 3307:3306
volumes:
- mariadb_data:/var/lib/mysql2
environment:
MYSQL_ROOT_PASSWORD: Qpq5nDb5MKD6v9bt8dPD
MYSQL_PASSWORD: 886eOqVMmlHsayu6Vyxw
MYSQL_USER: core
MYSQL_DATABASE: core
restart: on-failure

volumes:
mariadb_data:

0 comments on commit 8a94600

Please sign in to comment.