Skip to content

Commit 95de13f

Browse files
authored
chore(repo): default to ~/.lily repo (#696)
* chore(repo): default to ~/.lily repo - closes #678 * rename rest of env vars to LILY_*
1 parent 060241b commit 95de13f

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
name: installing schema
139139
command: ./lily migrate --latest
140140
environment:
141-
LOTUS_DB: postgres://postgres:password@localhost:5432/postgres?sslmode=disable
141+
LILY_DB: postgres://postgres:password@localhost:5432/postgres?sslmode=disable
142142
- run:
143143
command: |
144144
make test-coverage

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ LILY_TEST_DB="postgres://username@localhost/lily_test?sslmode=disable" go test .
8383

8484
Use the following env vars to configure the lotus node that lily reads from, and the database that it writes to:
8585

86-
- `LOTUS_PATH` - path to the lotus data dir. _default: `~/.lotus`_
87-
- `LOTUS_DB` - database connection . _default: `postgres://postgres:password@localhost:5432/postgres?sslmode=disable`_
86+
- `LILY_PATH` - path to the lotus data dir. _default: `~/.lily`_
87+
- `LILY_DB` - database connection . _default: `postgres://postgres:password@localhost:5432/postgres?sslmode=disable`_
8888

8989
The `walk` and `watch` commands expect a list of tasks to be provided. Each task is responsible for reading a particular type of data from the chain and persisting it to the database.
9090
The mapping between available tasks and database tables is as follows:

commands/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Note that jobs are not persisted between restarts of the daemon. See
123123
Name: "repo",
124124
Usage: "Specify path where lily should store chain state.",
125125
EnvVars: []string{"LILY_REPO"},
126-
Value: "~/.lotus",
126+
Value: "~/.lily",
127127
Destination: &daemonFlags.repo,
128128
},
129129
&cli.BoolFlag{

commands/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var InitCmd = &cli.Command{
3030
Name: "repo",
3131
Usage: "Specify path where lily should store chain state.",
3232
EnvVars: []string{"LILY_REPO"},
33-
Value: "~/.lotus",
33+
Value: "~/.lily",
3434
Destination: &initFlags.repo,
3535
},
3636
&cli.StringFlag{

commands/migrate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ var VisorDBFlags VisorDBOpts
3636
var dbConnectFlags = []cli.Flag{
3737
&cli.StringFlag{
3838
Name: "db",
39-
EnvVars: []string{"LOTUS_DB"},
39+
EnvVars: []string{"LILY_DB"},
4040
Value: "",
4141
Usage: "A connection string for the TimescaleDB database, for example postgres://postgres:password@localhost:5432/postgres?sslmode=disable",
4242
Destination: &VisorDBFlags.DB,
4343
},
4444
&cli.IntFlag{
4545
Name: "db-pool-size",
46-
EnvVars: []string{"LOTUS_DB_POOL_SIZE"},
46+
EnvVars: []string{"LILY_DB_POOL_SIZE"},
4747
Value: 75,
4848
Destination: &VisorDBFlags.DBPoolSize,
4949
},

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func SampleConf() *Conf {
8181
cfg.Storage = StorageConf{
8282
Postgresql: map[string]PgStorageConf{
8383
"Database1": {
84-
URLEnv: "LOTUS_DB", // LOTUS_DB is a historical accident, but we keep it as the default for compatibility
84+
URLEnv: "LILY_DB", // LILY_DB is a historical accident, but we keep it as the default for compatibility
8585
URL: "postgres://postgres:password@localhost:5432/postgres",
8686
PoolSize: 20,
8787
ApplicationName: "visor",

0 commit comments

Comments
 (0)