Skip to content

Commit

Permalink
migrate to docker folder and update the docker compose node setup
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Santev committed Jan 27, 2025
1 parent 50308ef commit 0ec6aa0
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rsantev/hydra-client:latest
FROM rsantev/hydra-client:local

WORKDIR /app

Expand All @@ -7,11 +7,10 @@ USER root
RUN apk add --no-cache bash curl

COPY ./scripts/secrets.sh .
COPY ./scripts/genesis.sh .
COPY ./scripts/run.sh .

# Make scripts executable
RUN chmod +x genesis.sh run.sh secrets.sh
RUN chmod +x secrets.sh run.sh

EXPOSE 9632 1478 8545

Expand Down
27 changes: 27 additions & 0 deletions docker/hydra_docker_compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Docker Compose setup

The purpose of the docker compose setup is to provide simple and easy-to-use setup.

_NB!_ Use more secure setup for validators.

## Installation

Ensure you have Docker installed and pull the image.

```
docker pull rsantev/hydragon-docker-compose:latest
```

## Run node

Add the needed secrets in the docker compose file in the `environment` section of the `hydra-node` service:
KEY
BLS_KEY
SIG
P2P_KEY

Run:

```
docker compose up
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ version: "3.8"

services:
hydra-node:
image: rsantev/hydra-testnet:latest
image: rsantev/hydragon-docker:latest
container_name: rpc-node-1
command:
[
command: [
"server",
"--data-dir",
"./node",
"--chain",
"genesis.json",
"testnet", # mainnet or testnet
"--grpc-address",
"127.0.0.1:9632",
"--libp2p",
Expand All @@ -25,12 +24,12 @@ services:
"--json-rpc-block-range-limit",
"0",
]
platform: linux/amd64
volumes:
- ./node:/app/node
environment:
# CoinGecko API Key for generating secretsManagerConfig.json
CG_KEY: ${COINGECKO_API_KEY}

ports:
- "10000:9632"
- "10001:1478"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ set -e
# Run secrets.sh
./secrets.sh

# Run secrets.sh
./genesis.sh

# Execute specified hydra command with all arguments
exec hydra "$@"
File renamed without changes.
23 changes: 0 additions & 23 deletions h_devnet/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions h_devnet/scripts/genesis.sh

This file was deleted.

0 comments on commit 0ec6aa0

Please sign in to comment.