Skip to content

Commit

Permalink
tools/docker: add solana localnet
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Dec 14, 2023
1 parent 71e1a79 commit 7579def
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/docker/compose
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1

base_files="-f docker-compose.yaml -f docker-compose.postgres.yaml"
base_files="-f docker-compose.yaml -f docker-compose.postgres.yaml -f docker-compose.solana.yaml"
# Allow for choosing between geth or parity
if [ $GETH_MODE ]; then
base_files="$base_files -f docker-compose.gethnet.yaml"
Expand Down
7 changes: 7 additions & 0 deletions tools/docker/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ MinContractPayment = '0.000001 link'
Name = 'primary-0-34055'
WSURL = 'ws://devnet:8546'
HTTPURL = 'http://devnet:8545'

[[Solana]]
ChainID = 'localnet'

[[Solana.Nodes]]
Name = 'sol-node'
URL = 'http://solana:8899'
20 changes: 20 additions & 0 deletions tools/docker/docker-compose.solana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.5'

services:
node:
depends_on:
- solana
node-2:
depends_on:
- solana
solana:
build: ../solana
container_name: solana
image: smartcontract/solana
ports:
- 8899
- 8900
volumes:
- solana-db-data:/solana/database
volumes:
solana-db-data:
4 changes: 4 additions & 0 deletions tools/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ services:
restart: always
environment:
- CL_DATABASE_URL
# - CL_SOLANA_CMD=chainlink-solana
# - CL_MEDIAN_CMD=chainlink-median
env_file:
- chainlink-variables.env
ports:
Expand All @@ -34,6 +36,8 @@ services:
restart: always
environment:
- CL_DATABASE_URL
# - CL_SOLANA_CMD=chainlink-solana
# - CL_MEDIAN_CMD=chainlink-median
env_file:
- chainlink-variables.env
ports:
Expand Down
8 changes: 8 additions & 0 deletions tools/solana/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ubuntu:20.04
WORKDIR /solana

ADD https://github.com/solana-labs/solana/releases/download/v1.16.23/solana-release-x86_64-unknown-linux-gnu.tar.bz2 .
RUN tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
ENV PATH=/solana/solana-release/bin:$PATH

ENTRYPOINT [ "solana-test-validator" ]

0 comments on commit 7579def

Please sign in to comment.