File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
imageroot/actions/configure-module Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,22 @@ if os.path.exists("n8n.env"):
2323 auth_token = secrets .token_urlsafe (32 )
2424else :
2525 auth_token = secrets .token_urlsafe (32 )
26+
27+
28+ if not os .path .exists ("n8n-db.env" ):
29+ if os .path .exists ("database.env" ):
30+ db = agent .read_envfile ("database.env" )
31+ random_key = secrets .token_hex (16 )
32+ n8n_config = {
33+ "N8N_ENCRYPTION_KEY" : random_key ,
34+ "DB_TYPE" : "postgresdb" ,
35+ "DB_POSTGRESDB_HOST" : "n8n-pgsql" ,
36+ "DB_POSTGRESDB_PORT" : "5432" ,
37+ "DB_POSTGRESDB_DATABASE" : db .get ("POSTGRES_DATABASE" ),
38+ "DB_POSTGRESDB_USER" : db .get ("POSTGRES_NON_ROOT_USER" ),
39+ "DB_POSTGRESDB_PASSWORD" : db .get ("POSTGRES_NON_ROOT_PASSWORD" ),
40+ }
41+ agent .write_envfile ("n8n-db.env" , n8n_config )
2642# n8n CSRF settings
2743host = data .get ("host" , "" )
2844timezone = data .get ("timezone" , "UTC" )
You can’t perform that action at this time.
0 commit comments