forked from cerc-io/ipld-eth-server
Default config starting block to 0
This commit is contained in:
parent
85cec480dc
commit
553fdbfa09
@ -25,7 +25,7 @@ e`
|
|||||||
### Automated
|
### Automated
|
||||||
The steps above have been rolled into a script: `/app/startup_script.sh`, which just assumes the DB env variables have been set, and defaults the rest to Kovan according to `environments/staging.toml`. This can be called with something like:
|
The steps above have been rolled into a script: `/app/startup_script.sh`, which just assumes the DB env variables have been set, and defaults the rest to Kovan according to `environments/staging.toml`. This can be called with something like:
|
||||||
|
|
||||||
`docker run -d -e DATABASE_NAME=vulcanize_pubic -e DATABASE_HOSTNAME=localhost -e DATABASE_PORT=5432 -e DATABASE_USER=vulcanize -e DATABASE_PASSWORD=vulcanize ./startup_script.sh`
|
`docker run -d -e DATABASE_NAME=vulcanize_public -e DATABASE_HOSTNAME=localhost -e DATABASE_PORT=5432 -e DATABASE_USER=vulcanize -e DATABASE_PASSWORD=vulcanize [container name] ./startup_script.sh`
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
When running, vDB services log to `/vulcanizedb.log`.
|
When running, vDB services log to `/vulcanizedb.log`.
|
||||||
|
@ -30,11 +30,12 @@ func getEnvironmentString(key string) string {
|
|||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns an int from the environment, defaulting to 0 if it does not exist
|
||||||
func getEnvironmentInt64(key string) int64 {
|
func getEnvironmentInt64(key string) int64 {
|
||||||
initConfig()
|
initConfig()
|
||||||
value := viper.GetInt64(key)
|
value := viper.GetInt64(key)
|
||||||
if value == -1 {
|
if value == -1 {
|
||||||
panic(fmt.Sprintf("No environment configuration variable set for key: \"%v\"", key))
|
return 0
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user