mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-09-02 11:13:51 +00:00
Document environment variable for database url (#5501)
This commit is contained in:
parent
5fa6a490d5
commit
7daa1c6543
2 changed files with 8 additions and 16 deletions
|
@ -1,15 +1,11 @@
|
||||||
{
|
{
|
||||||
# settings related to the postgresql database
|
# settings related to the postgresql database
|
||||||
database: {
|
database: {
|
||||||
# Configure the database by specifying URI pointing to a postgres instance
|
# Configure the database by specifying URI pointing to a postgres instance. This parameter can
|
||||||
|
# also be set by environment variable `LEMMY_DATABASE_URL`.
|
||||||
#
|
#
|
||||||
# This example uses peer authentication to obviate the need for creating,
|
# For an explanation of how to use connection URIs, see PostgreSQL's documentation:
|
||||||
# configuring, and managing passwords.
|
# https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
|
||||||
#
|
|
||||||
# For an explanation of how to use connection URIs, see [here][0] in
|
|
||||||
# PostgreSQL's documentation.
|
|
||||||
#
|
|
||||||
# [0]: https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
|
|
||||||
connection: "postgres://lemmy:password@localhost:5432/lemmy"
|
connection: "postgres://lemmy:password@localhost:5432/lemmy"
|
||||||
# Maximum number of active sql connections
|
# Maximum number of active sql connections
|
||||||
pool_size: 30
|
pool_size: 30
|
||||||
|
|
|
@ -143,15 +143,11 @@ pub enum PictrsImageMode {
|
||||||
#[derive(Debug, Deserialize, Serialize, Clone, SmartDefault, Document)]
|
#[derive(Debug, Deserialize, Serialize, Clone, SmartDefault, Document)]
|
||||||
#[serde(default, deny_unknown_fields)]
|
#[serde(default, deny_unknown_fields)]
|
||||||
pub struct DatabaseConfig {
|
pub struct DatabaseConfig {
|
||||||
/// Configure the database by specifying URI pointing to a postgres instance
|
/// Configure the database by specifying URI pointing to a postgres instance. This parameter can
|
||||||
|
/// also be set by environment variable `LEMMY_DATABASE_URL`.
|
||||||
///
|
///
|
||||||
/// This example uses peer authentication to obviate the need for creating,
|
/// For an explanation of how to use connection URIs, see PostgreSQL's documentation:
|
||||||
/// configuring, and managing passwords.
|
/// https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
|
||||||
///
|
|
||||||
/// For an explanation of how to use connection URIs, see [here][0] in
|
|
||||||
/// PostgreSQL's documentation.
|
|
||||||
///
|
|
||||||
/// [0]: https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
|
|
||||||
#[default("postgres://lemmy:password@localhost:5432/lemmy")]
|
#[default("postgres://lemmy:password@localhost:5432/lemmy")]
|
||||||
#[doku(example = "postgresql:///lemmy?user=lemmy&host=/var/run/postgresql")]
|
#[doku(example = "postgresql:///lemmy?user=lemmy&host=/var/run/postgresql")]
|
||||||
pub(crate) connection: String,
|
pub(crate) connection: String,
|
||||||
|
|
Loading…
Reference in a new issue