-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added logic to create base relayer image (#32)
- Loading branch information
Showing
10 changed files
with
122 additions
and
8 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,11 @@ | ||
#!/bin/sh | ||
|
||
echo "Setting up relayer for chains:" | ||
echo Chain: "$CHAIN_A" | ||
echo Chain: "$CHAIN_B" | ||
|
||
# Check gaia version | ||
echo "-------------------------------------------------------------------------------------------------------------------" | ||
echo "Relayer version" | ||
echo "-------------------------------------------------------------------------------------------------------------------" | ||
rrly |
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,28 @@ | ||
[global] | ||
timeout = '10s' | ||
strategy = 'naive' | ||
|
||
[[chains]] | ||
id = 'ibc0' | ||
rpc_addr = 'tcp://ibc0:26657' | ||
grpc_addr = 'tcp://localhost:9090' | ||
account_prefix = 'cosmos' | ||
key_name = 'testkey' | ||
store_prefix = 'ibc' | ||
client_ids = ['ethbridge'] | ||
gas = 200000 | ||
clock_drift = '5s' | ||
trusting_period = '14days' | ||
|
||
[[chains]] | ||
id = 'ibc1' | ||
rpc_addr = 'tcp://localhost:26557' | ||
grpc_addr = 'tcp://localhost:9090' | ||
account_prefix = 'cosmos' | ||
key_name = 'testkey' | ||
store_prefix = 'ibc' | ||
client_ids = ['ibconeclient'] | ||
gas = 200000 | ||
clock_drift = '5s' | ||
trusting_period = '14days' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
##################################################### | ||
#### Build image #### | ||
##################################################### | ||
FROM rust:slim AS build-env | ||
|
||
# Output Rust version | ||
RUN cargo --version | ||
|
||
# Set working dir | ||
WORKDIR /repo | ||
|
||
# Logic to cache cargo dependecies across builds | ||
COPY Cargo.lock . | ||
COPY Cargo.toml . | ||
COPY modules/Cargo.toml /repo/modules/Cargo.toml | ||
COPY proto/Cargo.toml /repo/proto/Cargo.toml | ||
COPY relayer/Cargo.toml /repo/relayer/Cargo.toml | ||
COPY relayer-cli/Cargo.toml /repo/relayer-cli/Cargo.toml | ||
RUN mkdir .cargo | ||
RUN cargo vendor > .cargo/config | ||
|
||
# Copy project files | ||
COPY . . | ||
|
||
# Build files | ||
RUN cargo build --workspace --all | ||
|
||
##################################################### | ||
#### Relayer image #### | ||
##################################################### | ||
FROM rust:slim | ||
|
||
# Copy relayer executable | ||
COPY --from=build-env /repo/target/debug/rrly /usr/bin/rrly | ||
|
||
ENV RELAYER /relayer | ||
|
||
WORKDIR $RELAYER | ||
|
||
COPY /repo/vendor /vendor | ||
|
||
# Copy configuration file | ||
COPY ci/simple_config.toml . | ||
|
||
# Copy setup script | ||
COPY ci/setup_relayer.sh . | ||
|
||
# Make it executable | ||
RUN chmod +x setup_relayer.sh | ||
|
||
# Entrypoint | ||
ENTRYPOINT ["/bin/sh", "-c", "/relayer/setup_relayer.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
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