-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
181 additions
and
7 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,38 @@ | ||
FROM golang:1.17 | ||
|
||
ARG chain="polkadot" | ||
ARG basepath="~/.gossamer" | ||
# ARG DD_API_KEY | ||
|
||
ENV GO111MODULE=on | ||
|
||
ENV chain=${chain} | ||
ENV basepath=${basepath} | ||
# ENV DD_API_KEY=${DD_API_KEY} | ||
|
||
# RUN ["sh", "-c", "DD_AGENT_MAJOR_VERSION=7 DD_INSTALL_ONLY=true DD_API_KEY=${DD_API_KEY} DD_SITE=\"datadoghq.com\" bash -c \"$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)\""] | ||
|
||
WORKDIR /gossamer | ||
|
||
COPY . . | ||
|
||
# RUN ["sh", "-c", "mv .github/workflows/staging/openmetrics.d/${chain}-conf.yaml /etc/datadog-agent/conf.d/openmetrics.d/conf.yaml"] | ||
# RUN ls -la /etc/datadog-agent/conf.d/openmetrics.d/ | ||
# RUN cat /etc/hosts | ||
# RUN service datadog-agent start | ||
|
||
RUN go get ./... | ||
RUN go build github.com/ChainSafe/gossamer/cmd/gossamer | ||
|
||
RUN gossamer --key alice init | ||
|
||
# use a hardcoded key for alice, so we can determine what the peerID is for subsequent nodes | ||
|
||
RUN cp devnet/alice.node.key ~/.gossamer/gssmr/node.key | ||
|
||
RUN ls -la ~/.gossamer/gssmr | ||
|
||
RUN cat ~/.gossamer/gssmr/node.key | ||
|
||
ENTRYPOINT gossamer --key=alice --babe-lead --publish-metrics --rpc --rpc-external=true | ||
EXPOSE 7001 8545 8546 8540 9876 |
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,32 @@ | ||
FROM golang:1.17 | ||
|
||
ARG key | ||
RUN test -n "$key" | ||
|
||
# ARG DD_API_KEY | ||
|
||
ENV GO111MODULE=on | ||
|
||
ENV key=${key} | ||
# ENV DD_API_KEY=${DD_API_KEY} | ||
|
||
# RUN ["sh", "-c", "DD_AGENT_MAJOR_VERSION=7 DD_INSTALL_ONLY=true DD_API_KEY=${DD_API_KEY} DD_SITE=\"datadoghq.com\" bash -c \"$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)\""] | ||
|
||
WORKDIR /gossamer | ||
|
||
COPY . . | ||
|
||
# RUN ["sh", "-c", "mv .github/workflows/staging/openmetrics.d/${chain}-conf.yaml /etc/datadog-agent/conf.d/openmetrics.d/conf.yaml"] | ||
# RUN ls -la /etc/datadog-agent/conf.d/openmetrics.d/ | ||
# RUN cat /etc/hosts | ||
# RUN service datadog-agent start | ||
|
||
RUN go get ./... | ||
RUN go build github.com/ChainSafe/gossamer/cmd/gossamer | ||
|
||
# RUN gossamer --key bob init | ||
RUN ["sh", "-c", "gossamer --key=${key} init"] | ||
# ENTRYPOINT gossamer --key=bob --bootnodes /ip4/10.5.0.2/tcp/7001/p2p/12D3KooWMER5iow67nScpWeVqEiRRx59PJ3xMMAYPTACYPRQbbWU --rpc --rpc-external=true | ||
ENTRYPOINT ["sh", "-c", "gossamer --key=${key} --bootnodes=/ip4/10.5.0.2/tcp/7001/p2p/12D3KooWMER5iow67nScpWeVqEiRRx59PJ3xMMAYPTACYPRQbbWU --rpc --rpc-external=true"] | ||
|
||
EXPOSE 7001 8545 8546 8540 9876 |
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,59 @@ | ||
services: | ||
alice: | ||
build: | ||
context: ./.. | ||
dockerfile: alice.Dockerfile | ||
ports: | ||
- "7001" | ||
- "8545" | ||
- "8546" | ||
- "8540" | ||
- "9876" | ||
networks: | ||
vpcbr: | ||
ipv4_address: 10.5.0.2 | ||
|
||
bob: | ||
build: | ||
context: ./.. | ||
dockerfile: bob.Dockerfile | ||
args: | ||
key: "bob" | ||
ports: | ||
- "7001" | ||
- "8545" | ||
- "8546" | ||
- "8540" | ||
- "9876" | ||
networks: | ||
vpcbr: | ||
ipv4_address: 10.5.0.3 | ||
depends_on: | ||
- "alice" | ||
|
||
charlie: | ||
build: | ||
context: ./.. | ||
dockerfile: bob.Dockerfile | ||
args: | ||
key: "charlie" | ||
ports: | ||
- "7001" | ||
- "8545" | ||
- "8546" | ||
- "8540" | ||
- "9876" | ||
networks: | ||
vpcbr: | ||
ipv4_address: 10.5.0.4 | ||
depends_on: | ||
- "alice" | ||
|
||
networks: | ||
vpcbr: | ||
driver: bridge | ||
internal: true | ||
ipam: | ||
config: | ||
- subnet: 10.5.0.0/16 | ||
gateway: 10.5.0.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