Skip to content

Commit

Permalink
fix: Snapshot envvar; prom host; env quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
placer14 committed Aug 24, 2022
1 parent 4ee032c commit 194d34e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/grafana/provisioning/datasources/datasource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ datasources:
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://localhost:9090
url: http://prometheus:9090
# <string> database password, if used
password:
# <string> database user, if used
Expand Down
13 changes: 8 additions & 5 deletions build/lily/docker_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ set -exo pipefail

mkdir -p ${LILY_REPO}/keystore

if [[ ! -z "${_LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT}" ]]; then
# import snapshot when _LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT is set

if [[ ! -z "${LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT}" ]]; then
# set default snapshot path if not already defined
snapshot="${LILY_DOCKER_INIT_IMPORT_SNAPSHOT_PATH:-https://snapshots.mainnet.filops.net/minimal/latest}"

# import snapshot when LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT is set
if [[ -f "${LILY_REPO}/datastore/_imported" ]]; then
echo "Skipping import, found ${LILY_REPO}/datastore/_imported file."
else
echo "Importing snapshot from https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car..."
lily init --import-snapshot="https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car"

echo "Importing snapshot from ${snapshot}"
lily init --import-snapshot=${snapshot}
status=$?
if [ $status -eq 0 ]; then
touch "/var/lib/lily/datastore/_imported"
Expand Down
11 changes: 6 additions & 5 deletions build/lily/notifier.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ LILY_REPO=/var/lib/lily
#LILY_CONFIG=/var/lib/lily/config.toml

# Postgres URL may be overridden
LILY_STORAGE_POSTGRESQL_DB_URL="postgres://postgres@timescaledb:5432/postgres"
LILY_STORAGE_POSTGRESQL_DB_URL=postgres://postgres@timescaledb:5432/postgres?sslmode=disable

# Enable IMPORT_SNAPSHOT below to use snapshot on lily startup
#_LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT=true
#LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT=true
#LILY_DOCKER_INIT_IMPORT_SNAPSHOT_PATH=

# Debugging options
#LILY_TRACING=true
LILY_PROMETHEUS_PORT="localhost:9090"
LILY_PROMETHEUS_PORT=0.0.0.0:9090

# Logging options
GOLOG_LOG_FMT=json
GOLOG_LOG_LEVEL=info
LILY_LOG_LEVEL_NAMED="vm:error,badgerbs:error"
LILY_LOG_LEVEL_NAMED=vm:error,badgerbs:error

# Queue configuration
LILY_REDIS_ADDR="redis-queue:6379"
LILY_REDIS_ADDR=redis-queue:6379
11 changes: 6 additions & 5 deletions build/lily/worker.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ LILY_REPO=/var/lib/lily
#LILY_CONFIG=/var/lib/lily/config.toml

# Postgres URL may be overridden
LILY_STORAGE_POSTGRESQL_DB_URL="postgres://postgres@timescaledb:5432/postgres"
LILY_STORAGE_POSTGRESQL_DB_URL=postgres://postgres@timescaledb:5432/postgres?sslmode=disable

# Enable IMPORT_SNAPSHOT below to use snapshot on lily startup
#_LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT=true
#LILY_DOCKER_INIT_IMPORT_MAINNET_SNAPSHOT=true
#LILY_DOCKER_INIT_IMPORT_SNAPSHOT_PATH=

# Debugging options
#LILY_TRACING=true
LILY_PROMETHEUS_PORT="localhost:9091"
LILY_PROMETHEUS_PORT=0.0.0.0:9091

# Logging options
GOLOG_LOG_FMT=json
GOLOG_LOG_LEVEL=info
LILY_LOG_LEVEL_NAMED="vm:error,badgerbs:error"
LILY_LOG_LEVEL_NAMED=vm:error,badgerbs:error

# Queue configuration
LILY_REDIS_ADDR="redis-queue:6379"
LILY_REDIS_ADDR=redis-queue:6379

0 comments on commit 194d34e

Please sign in to comment.