-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Net Mk1 - example using docker-compose
- Loading branch information
1 parent
e4487fc
commit 914b4e0
Showing
11 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Net Mk1 Example | ||
|
||
## Test | ||
|
||
``` | ||
cd core/net/examples/docker | ||
docker-compose up | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: "3.0" | ||
services: | ||
hub: | ||
build: | ||
context: ../../../.. | ||
dockerfile: core/net/examples/docker/hub.Dockerfile | ||
image: hub | ||
provider-1: | ||
build: | ||
context: ../../../.. | ||
dockerfile: core/net/examples/docker/provider-1.Dockerfile | ||
image: provider-1 | ||
depends_on: | ||
- hub | ||
provider-2: | ||
build: | ||
context: ../../../.. | ||
dockerfile: core/net/examples/docker/provider-2.Dockerfile | ||
image: provider-2 | ||
depends_on: | ||
- provider-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM rust:1.40 | ||
|
||
WORKDIR /usr/src/yagna-net | ||
COPY . . | ||
|
||
RUN cargo build --examples --bins | ||
EXPOSE 9000 | ||
CMD [ "cargo", "run", "--bin", "ya-sb-router", "--", "-l", "0.0.0.0:9000" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
cargo run --bin ya-sb-router & | ||
cargo run --example listen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM rust:1.40 | ||
|
||
WORKDIR /usr/src/yagna-net | ||
COPY . . | ||
|
||
RUN cargo build --examples --bins | ||
EXPOSE 9000 | ||
|
||
CMD ./core/net/examples/docker/listen.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM rust:1.40 | ||
|
||
WORKDIR /usr/src/yagna-net | ||
COPY . . | ||
|
||
RUN cargo build --examples --bins | ||
EXPOSE 9000 | ||
|
||
CMD ./core/net/examples/docker/send_message.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
cargo run --bin ya-sb-router & | ||
cargo run --example send_message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters