satoshipay / docker-stellar-horizon

Fully configurable docker image for Stellar Horizon
MIT License
15 stars 15 forks source link

Missing network passphrase in example compose file #12

Open todkap opened 5 years ago

todkap commented 5 years ago

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

stellar-horizon-postgres1 | 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/

gluk73 commented 5 years ago

How did you provided password for connection to Horizon? From where it takes password? I installed postgres on local Linux and disabled both dockers that run db for core and for horizon. Instead of that I point both of them to my local db. The core is connecting to db and Horizon screams that connection failed due to password auth failed.

This is how the end of my .yml file looks like. So it is not clear from where Horizon takes password for its db.

stellar-horizon: image: satoshipay/stellar-horizon:0.17.2 restart: on-failure ports:

This is log i'm getting

root@virtualserver01:~# docker-compose -f /mnt/xvdc/github/docker-stellar-horizon/conf_horizon_docker-compose_extdb.yml up Starting docker-stellar-horizon_stellar-core_1 ... done Starting docker-stellar-horizon_stellar-horizon_1 ... done Attaching to docker-stellar-horizon_stellar-horizon_1, docker-stellar-horizon_stellar-core_1 stellar-horizon_1 | Initializing Horizon database... stellar-horizon_1 | 2019/09/17 00:03:39 connect failed: pq: password authentication failed for user "postgres" stellar-horizon_1 | Horizon database initialization failed (possibly because it has been done before) stellar-horizon_1 | 2019/09/17 00:03:39 pq: password authentication failed for user "postgres" stellar-core_1 | Core db has already been initialized. stellar-core_1 | Not initializing history archives (set INITIALIZE_HISTORY_ARCHIVES=true if you want to initialize them). stellar-core_1 | Using DEPRECATED command-line syntax. stellar-core_1 | Please refer to documentation for new syntax. stellar-core_1 | stellar-core_1 | 2019-09-17T00:03:41.160 [default INFO] Assigning calculated value of 1 to FAILURE_SAFETY stellar-core_1 | 2019-09-17T00:03:41.165 GC2LC [default INFO] Starting stellar-core v10.2.0 stellar-core_1 | 2019-09-17T00:03:41.166 GC2LC [Database INFO] Connecting to: postgresql://dbname=stellar_core user=postgres password=**** host=10.165.7.173 stellar-core_1 | 2019-09-17T00:03:41.170 GC2LC [SCP INFO] LocalNode::LocalNode@GC2LC qSet: 1f303f stellar-core_1 | 2019-09-17T00:03:41.170 GC2LC [default INFO] Listening on 0.0.0.0:11626 for HTTP requests