add port
This commit is contained in:
parent
c8e029888a
commit
edea6b21d9
1 changed files with 7 additions and 1 deletions
|
|
@ -100,6 +100,12 @@
|
||||||
example = default;
|
example = default;
|
||||||
description = "Database host";
|
description = "Database host";
|
||||||
};
|
};
|
||||||
|
port = mkOption rec {
|
||||||
|
type = types.int;
|
||||||
|
default = 5432;
|
||||||
|
example = default;
|
||||||
|
description = "Database port";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
enableServer = mkOption rec {
|
enableServer = mkOption rec {
|
||||||
|
|
@ -194,7 +200,7 @@
|
||||||
if cfg.phx.database.passwordFile != null
|
if cfg.phx.database.passwordFile != null
|
||||||
then ''
|
then ''
|
||||||
export DB_PASSWORD=$(cat ${cfg.phx.database.passwordFile})
|
export DB_PASSWORD=$(cat ${cfg.phx.database.passwordFile})
|
||||||
export DATABASE_URL="ecto://${cfg.phx.database.user}:$DB_PASSWORD@${cfg.phx.database.host}/${cfg.phx.database.name}"
|
export DATABASE_URL="ecto://${cfg.phx.database.user}:$DB_PASSWORD@${cfg.phx.database.host}:${toString cfg.phx.database.port}/${cfg.phx.database.name}"
|
||||||
''
|
''
|
||||||
else ''
|
else ''
|
||||||
export DATABASE_URL="ecto://${cfg.phx.database.user}@${cfg.phx.database.host}/${cfg.phx.database.name}"
|
export DATABASE_URL="ecto://${cfg.phx.database.user}@${cfg.phx.database.host}/${cfg.phx.database.name}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue