Giter Club home page Giter Club logo

docker-stellar-horizon's People

Contributors

andrenarchy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-stellar-horizon's Issues

Missing network passphrase in example compose file

When trying to start docker compose, I was seeing the following in the logs...

stellar-horizon-postgres_1 | AS $$ SELECT $1 $$
stellar-horizon_1 | 2019/04/26 11:09:11 Invalid config: network-passphrase is blank. Please specify --network-passphrase on the command line or set the NETWORK_PASSPHRASE environment variable.
docker-stellar-horizon_stellar-horizon_1 exited with code 1

If I add - NETWORK_PASSPHRASE=Public Global Stellar Network ; September 2015 to the horizon ENV...

 stellar-horizon:
    image: satoshipay/stellar-horizon:0.17.2
    restart: on-failure
    ports:
    - 8000:8000
    environment:
      - DATABASE_URL=postgres://postgres@stellar-horizon-postgres/stellar-horizon?sslmode=disable
      - STELLAR_CORE_DATABASE_URL=postgres://postgres@stellar-core-postgres/stellar-core?sslmode=disable
      - STELLAR_CORE_URL=http://stellar-core:11626
      - NETWORK_PASSPHRASE=Public Global Stellar Network ; September 2015
      - INGEST=true

and now I can access the server on http://localhost:8000/

Perform migrations on start up

Stellar core automatically migrates its database on start up if it's not migrated yet and there's no way to control that behaviour. I think that this image should also do the same unconditionally because:

  1. It wouldn't make it any less flexible than stellar core and everyone running horizon must also deal with stellar core's limitations
  2. It would make the behaviour consistent and avoid requiring manual intervention during database upgrades.

I'd also be happy to have this configurable via an environment variable. Same for core, but it would require a code change for core. See stellar/stellar-core#1912

check that db initialization was done properly

I'm running into an issue in CI where if horizon starts up before everything else and it hasn't performed db initialization, it can get into a broken state where it's running but never initialized the database. I don't know if this is a horizon bug, a docker image startup script bug or both, but I think this issue can be worked around in the startup script by checking more specifically that db initialization was done.

Logs:

stellar-horizon_1     | 2019-02-05T17:39:52.920368516Z Initializing Horizon database...
stellar-horizon_1     | 2019-02-05T17:39:53.004165677Z Horizon database initialization failed (possibly because it has been done before)
stellar-horizon_1     | 2019-02-05T17:39:53.004197994Z time="2019-02-05T17:39:52.998Z" level=error msg="connect failed: pq: the database system is starting up" pid=7 
stellar-horizon_1     | 2019-02-05T17:39:53.581502682Z time="2019-02-05T17:39:53.581Z" level=warning msg="could not load stellar-core info: http request errored: Get http://<redacted>:11626/info: dial tcp 172.18.0.2:11626: connect: connection refused" pid=1 
stellar-horizon_1     | 2019-02-05T17:39:53.590863575Z time="2019-02-05T17:39:53.590Z" level=info msg="Starting horizon on :8000 (ingest: true)" pid=1 
stellar-horizon_1     | 2019-02-05T17:39:54.005158450Z time="2019-02-05T17:39:54.005Z" level=error msg="failed to load operation fee stats state" err="get failed: pq: relation "history_ledgers" does not exist" pid=1 stack="[main.go:43 session.go:106 main.go:322 app.go:206 app.go:313 asm_amd64.s:1333]" 
stellar-horizon_1     | 2019-02-05T17:39:54.006246193Z time="2019-02-05T17:39:54.006Z" level=error msg="failed to load ledger state" err="get failed: pq: relation "history_ledgers" does not exist" pid=1 stack="[main.go:43 session.go:106 main.go:316 app.go:176 app.go:312 asm_amd64.s:1333]" 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.