Skip to content

Commit

Permalink
feat: playground.
Browse files Browse the repository at this point in the history
  • Loading branch information
l-monninger committed Feb 1, 2024
1 parent e46901f commit f2e64e7
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
22 changes: 21 additions & 1 deletion docker/testnet.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
sudo \
git
git

RUN apt-get install -y libclang-dev

Expand All @@ -44,9 +44,29 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
RUN node --version
RUN npm --version

RUN apt-get update && apt-get install -y unzip
# Install protoc
# Determine architecture and download appropriate version of protoc
ARG PROTOC_VERSION=3.15.8
RUN ARCH=$(dpkg --print-architecture) && \
if [ "$ARCH" = "amd64" ]; then \
PROTOC_ARCH="linux-x86_64"; \
elif [ "$ARCH" = "arm64" ]; then \
PROTOC_ARCH="linux-aarch_64"; \
else \
echo "Unsupported architecture: $ARCH"; exit 1; \
fi && \
curl -fSsL -o protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${PROTOC_ARCH}.zip" \
&& unzip protoc.zip -d /usr/local \
&& rm protoc.zip

# Verify protoc installation
RUN protoc --version

# Download the script
RUN curl -fSsL -o install.sh https://raw.githubusercontent.com/movemntdev/M1/main/scripts/install.sh


# Make the script executable
RUN chmod +x install.sh

Expand Down
2 changes: 1 addition & 1 deletion movement-sdk/services/src/m1/testnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl ConstructorOperations for Constructor {
r#"
set -e
echo $MOVEMENT_DIR
$MOVEMENT_DIR/bin/avalanchego --network-id=fuji --track-subnets=$(cat $MOVEMENT_DIR/rsc/testnet-id) --plugin-dir=$MOVEMENT_DIR/avalanchego/plugins
$MOVEMENT_DIR/bin/avalanchego --network-id=fuji --track-subnets=$(cat $MOVEMENT_DIR/rsc/testnet-id) --plugin-dir=$MOVEMENT_DIR/avalanchego/plugins --http-host=0.0.0.0
"#.to_string(),
vec![
testnet::Constructor::default_with_version(
Expand Down
20 changes: 20 additions & 0 deletions playground/remote/localnet/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.8'
services:
localnet:
image: mvlbs/m1-testnet
command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "localnet"]
ports:
- "9650:9650"

proxy:
image: mvlbs/m1-testnet
command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "proxy", "--base-url", "http://localnet:9650"]
ports:
- "3001:3001"

mevm:
image: mvlbs/m1-testnet
command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "mevm", "--node-url", "http://proxy:3001" ]
ports:
- "3044:3044"

20 changes: 20 additions & 0 deletions playground/remote/testnet/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.8'
services:
fuji:
image: mvlbs/m1-testnet
command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "testnet"]
ports:
- "9650:9650"

proxy:
image: mvlbs/m1-testnet
command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "proxy", "--base-url", "http://localnet:9650"]
ports:
- "3001:3001"

mevm:
image: mvlbs/m1-testnet
command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "mevm", "--node-url", "http://proxy:3001" ]
ports:
- "3044:3044"

0 comments on commit f2e64e7

Please sign in to comment.