Skip to content

Commit 769d6b6

Browse files
committed
feat: added database discovery
1 parent b6e06ef commit 769d6b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

imageroot/bin/discover-database

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import agent
1010
import os
1111

1212
# Connect the local Redis replica. This is necessary to consistently start
13-
database = "database.env"
13+
database = "paperless-db.env"
1414
# check if it exists
1515
# set the default values
1616

@@ -26,6 +26,8 @@ if not os.path.exists(database):
2626
"PAPERLESS_DBPASS": POSTGRES_PASSWORD,
2727
}
2828
agent.write_envfile("paperless-db.env", paperless_config)
29+
30+
if not os.path.exists("secret_key.env"):
2931
PAPERLESS_SECRET_KEY = os.getenv("PAPERLESS_SECRET_KEY", "")
3032
secret_key = {
3133
"PAPERLESS_SECRET_KEY": PAPERLESS_SECRET_KEY,

0 commit comments

Comments
 (0)