mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
🔀 Merge branch 'postgres-schema-support' of https://github.com/richteri/n8n into richteri-postgres-schema-support
This commit is contained in:
commit
d1d94eab6d
|
@ -156,6 +156,7 @@ Replace the following placeholders with the actual data:
|
|||
- <POSTGRES_PASSWORD>
|
||||
- <POSTGRES_PORT>
|
||||
- <POSTGRES_USER>
|
||||
- <POSTGRES_SCHEMA>
|
||||
|
||||
```
|
||||
docker run -it --rm \
|
||||
|
@ -166,6 +167,7 @@ docker run -it --rm \
|
|||
-e DB_POSTGRESDB_HOST=<POSTGRES_HOST> \
|
||||
-e DB_POSTGRESDB_PORT=<POSTGRES_PORT> \
|
||||
-e DB_POSTGRESDB_USER=<POSTGRES_USER> \
|
||||
-e DB_POSTGRESDB_SCHEMA=<POSTGRES_SCHEMA> \
|
||||
-e DB_POSTGRESDB_PASSWORD=<POSTGRES_PASSWORD> \
|
||||
-v ~/.n8n:/root/.n8n \
|
||||
n8nio/n8n \
|
||||
|
@ -214,6 +216,7 @@ The following environment variables support file input:
|
|||
- DB_POSTGRESDB_PASSWORD_FILE
|
||||
- DB_POSTGRESDB_PORT_FILE
|
||||
- DB_POSTGRESDB_USER_FILE
|
||||
- DB_POSTGRESDB_SCHEMA_FILE
|
||||
- N8N_BASIC_AUTH_PASSWORD_FILE
|
||||
- N8N_BASIC_AUTH_USER_FILE
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ To use PostgresDB as database you can provide the following environment variable
|
|||
- `DB_POSTGRESDB_PORT` (default: 5432)
|
||||
- `DB_POSTGRESDB_USER` (default: 'root')
|
||||
- `DB_POSTGRESDB_PASSWORD` (default: empty)
|
||||
- `DB_POSTGRESDB_SCHEMA` (default: 'public')
|
||||
|
||||
|
||||
```bash
|
||||
|
@ -47,6 +48,7 @@ export DB_POSTGRESDB_HOST=postgresdb
|
|||
export DB_POSTGRESDB_PORT=5432
|
||||
export DB_POSTGRESDB_USER=n8n
|
||||
export DB_POSTGRESDB_PASSWORD=n8n
|
||||
export DB_POSTGRESDB_SCHEMA=n8n
|
||||
|
||||
n8n start
|
||||
```
|
||||
|
|
|
@ -13,5 +13,6 @@ The following environment variables support file input:
|
|||
- DB_POSTGRESDB_PASSWORD_FILE
|
||||
- DB_POSTGRESDB_PORT_FILE
|
||||
- DB_POSTGRESDB_USER_FILE
|
||||
- DB_POSTGRESDB_SCHEMA_FILE
|
||||
- N8N_BASIC_AUTH_PASSWORD_FILE
|
||||
- N8N_BASIC_AUTH_USER_FILE
|
||||
|
|
|
@ -51,6 +51,12 @@ const config = convict({
|
|||
default: 'root',
|
||||
env: 'DB_POSTGRESDB_USER'
|
||||
},
|
||||
schema: {
|
||||
doc: 'PostgresDB Schema',
|
||||
format: String,
|
||||
default: 'public',
|
||||
env: 'DB_POSTGRESDB_SCHEMA'
|
||||
},
|
||||
},
|
||||
mysqldb: {
|
||||
database: {
|
||||
|
|
|
@ -57,6 +57,7 @@ export async function init(synchronize?: boolean): Promise<IDatabaseCollections>
|
|||
password: await GenericHelpers.getConfigValue('database.postgresdb.password') as string,
|
||||
port: await GenericHelpers.getConfigValue('database.postgresdb.port') as number,
|
||||
username: await GenericHelpers.getConfigValue('database.postgresdb.user') as string,
|
||||
schema: await GenericHelpers.getConfigValue('database.postgresdb.schema') as string,
|
||||
};
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue