github.com/solongordon/pop@v4.10.0+incompatible/genny/config/templates/mysql.yml.tmpl (about)

     1  development:
     2    dialect: "mysql"
     3    database: "{{.opts.Prefix}}_development"
     4    host: "localhost"
     5    port: "3306"
     6    user: "root"
     7    password: "root"
     8  
     9  test:
    10    dialect: "mysql"
    11    #
    12    # You can use a single URL string for the same configuration:
    13    #
    14    #url: "mysql://root:root@(localhost:3306)/{{.opts.Prefix}}_test?parseTime=true&multiStatements=true&readTimeout=3s"
    15    #
    16    # Note that if you use `url`, other configurations are silently ignored.
    17    # In this case, the URL must contain all required connection parameters.
    18    #
    19    database: "{{.opts.Prefix}}_test"
    20    host: "localhost"
    21    port: "3306"
    22    user: "root"
    23    password: "root"
    24  
    25  production:
    26    #
    27    # You can also use environmental variables to override values in this config.
    28    #
    29    #url: {{"{{"}}envOr "DATABASE_URL" "mysql://root:root@(localhost:3306)/{{.opts.Prefix}}_production?parseTime=true&multiStatements=true&readTimeout=3s"}}
    30    #
    31    dialect: "mysql"
    32    database: "{{.opts.Prefix}}_production"
    33    host: {{"{{"}}envOr "DATABASE_HOST" "localhost"}}
    34    port: {{"{{"}}envOr "DATABASE_PORT" "3306"}}
    35    user: {{"{{"}}envOr "DATABASE_USER" "root"}}
    36    password: {{"{{"}}envOr "DATABASE_PASSWORD" "root"}}
    37    #
    38    # And you can also override connection parameters by setting it under options.
    39    #
    40    #options:
    41    #  parseTime: true
    42    #  multiStatements: true
    43    #  readTimeout: 3s
    44    #  encoding: "utf8mb4_general_ci"
    45    #
    46    # CAUTION!
    47    #   `parseTime` and` multiStatements` must be set to `true` to work properly.
    48    #   If you are not sure, do not change (or set) these values.