Skip to content

Instantly share code, notes, and snippets.

@andrenarchy
Last active August 21, 2018 23:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrenarchy/bf56cfbded42da48e2e255a11de7cb49 to your computer and use it in GitHub Desktop.
Save andrenarchy/bf56cfbded42da48e2e255a11de7cb49 to your computer and use it in GitHub Desktop.
Stellar Core and Horizon with docker-compose
version: '3'
services:
postgres-core:
image: postgres:9
volumes:
- "/var/stellar-data-testnet/postgres-core:/var/lib/postgresql/data"
environment:
- POSTGRES_DB=stellar-core
stellar-core:
image: stellar-core
restart: on-failure
links:
- postgres-core
ports:
# peer port
- "11625:11625"
volumes:
- "/var/stellar-data-testnet/core:/data"
environment:
- DATABASE=postgresql://dbname=stellar-core user=postgres host=postgres-core
- NODE_SEED=XXXXXX
- KNOWN_PEERS=core-testnet1.stellar.org,core-testnet2.stellar.org,core-testnet3.stellar.org
- NETWORK_PASSPHRASE=Test SDF Network ; September 2015
- UNSAFE_QUORUM=true
- FAILURE_SAFETY=1
- CATCHUP_RECENT=60480
- >-
NODE_NAMES=
GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y sdf1,
GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP sdf2,
GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z sdf3
- >-
QUORUM_SET=[
{
"threshold_percent": 51,
"validators":["$$sdf1","$$sdf2","$$sdf3"]
}
]
- >-
HISTORY={
"h1": {"get": "curl -sf http://s3-eu-west-1.amazonaws.com/history.stellar.org/prd/core-testnet/core_testnet_001/{0} -o {1}"},
"h2": {"get": "curl -sf http://s3-eu-west-1.amazonaws.com/history.stellar.org/prd/core-testnet/core_testnet_002/{0} -o {1}"},
"h3": {"get": "curl -sf http://s3-eu-west-1.amazonaws.com/history.stellar.org/prd/core-testnet/core_testnet_003/{0} -o {1}"}
}
postgres-horizon:
image: postgres:9
volumes:
- "/var/stellar-data-testnet/postgres-horizon:/var/lib/postgresql/data"
environment:
- POSTGRES_DB=stellar-horizon
stellar-horizon:
image: stellar-horizon
restart: on-failure
links:
- stellar-core
- postgres-horizon
- postgres-core
ports:
# HTTP port
- "8000:8000"
environment:
- DATABASE_URL=postgres://postgres@postgres-horizon/stellar-horizon?sslmode=disable
- STELLAR_CORE_DATABASE_URL=postgres://postgres@postgres-core/stellar-core?sslmode=disable
- STELLAR_CORE_URL=http://stellar-core:11626
- INGEST=true
@bigmeech
Copy link

hi there. great find thanks for sharing.

i'm getting

ERROR: pull access denied for stellar-core, repository does not exist or may require 'docker login'

is stellar-core not a public image?

@remitaffin
Copy link

Replace line 10 with:
image: satoshipay/stellar-core

And line 52 with:
image: satoshipay/stellar-horizon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment