# Configuration vars for cmd/app
[app]
name = "Fiber starter"
host = "http://38.47.180.165"
port = ":8800"
domain = "https://dev.mikulnews.com/api"
external-port = ":8802"
idle-timeout = 5 # As seconds
print-routes = false
prefork = true
production = false
body-limit = 1048576000 # "100 * 1024 * 1024"

[db.postgres]
dsn = "postgresql://medols_user:MedolsDB@2025@38.47.180.165:5432/medols_db" # <driver>://<username>:<password>@<host>:<port>/<database>
log-mode = "NONE"
migrate = true
seed = true

[logger]
log-dir = "debug.log"
time-format = "" # https://pkg.go.dev/time#pkg-constants, https://github.com/rs/zerolog/blob/master/api.go#L10 
level = 0 # panic -> 5, fatal -> 4, error -> 3, warn -> 2, info -> 1, debug -> 0, trace -> -1
prettier = true

[objectstorage.miniostorage]
endpoint = "38.47.180.165:9009"
access-key-id = "lBtjqWidHz1ktBbduwGy"
secret-access-key = "nsedJIa2FI7SqsEVcSFqJrlP4JuFRWGLauNpzD0i"
use-ssl = false
bucket-name = "mikulnews"
location = "us-east-1"

[middleware.compress]
enable = true
level = 1

[middleware.recover]
enable = true

[middleware.monitor]
enable = true
path = "/monitor"

[middleware.pprof]
enable = true

[middleware.cors]
enable = true

[middleware.limiter]
enable = true
max = 20
expiration_seconds = 60

[middleware.csrf]
enable = false
cookie-name = "csrf_"
cookie-same-site = "Lax"
cookie-secure = false
cookie-session-only = true
cookie-http-only = true

[middleware.audittrails]
enable = true
retention = 30

[keycloak]
endpoint = "http://38.47.180.165:8008"
realm = "medols"
client-id = "medols-app"
client-secret = "iyonEpZbAUs20quwaNFLMwRX7MUgPRlS"
admin-username = "developer-admin"
admin-password = "P@ssw0rd.1"

[smtp]
host = "mail.polri.go.id"
port = 465
username = "webhumas.divhumas@polri.go.id"
password = "8vm1nxxTsaB6"
from-address = "webhumas.divhumas@polri.go.id"
from-name = "APLIKASI WEB HUMAS DIVHUMAS POLRI"