Files
elprice/resources/system.edn
T

70 lines
2.5 KiB
Clojure

{:system/env
#profile {:dev :dev
:test :test
:prod :prod}
:server/http
{:port #long #or [#env PORT 3000]
:host #or [#env HTTP_HOST "0.0.0.0"]
:handler #ig/ref :handler/ring}
:handler/ring
{:router #ig/ref :router/core
:api-path "/api"
:cookie-secret #or [#env COOKIE_SECRET "JJCILTOQLMYRBFRU"]
;; from ring.middleware.defaults. anti-forgery `false` by default because services may not require it
:site-defaults-config {:params {:urlencoded true
:multipart true
:nested true
:keywordize true}
:cookies true
:session {:flash true
:cookie-name "pmagnus.elprice"
:cookie-attrs {:max-age 86400
:http-only true
:same-site :strict}}
:security {:anti-forgery false
:xss-protection {:enable? true,
:mode :block}
:frame-options :sameorigin
:content-type-options :nosniff}
:static {:resources "public"}
:responses {:not-modified-responses true
:absolute-redirects true
:content-types true
:default-charset "utf-8"}}}
:reitit.routes/api
{:base-path "/api"
:env #ig/ref :system/env
:query-fn #ig/ref :db.sql/query-fn}
:router/routes
{:routes #ig/refset :reitit/routes}
:router/core
{:routes #ig/ref :router/routes
:env #ig/ref :system/env}
:db.sql/connection
#profile {:dev {:jdbc-url "jdbc:postgresql://localhost:5432/elprice?user=elprice&password=elprice"}
:test {:jdbc-url "jdbc:postgresql://localhost:5432/elprice?user=elprice&password=elprice"}
:prod {:jdbc-url #env JDBC_URL
:init-size 1
:min-idle 1
:max-idle 8
:max-active 32}}
:db.sql/query-fn
{:conn #ig/ref :db.sql/connection
:options {}
:filename "queries.sql"
:env #ig/ref :system/env}
:db.sql/migrations
{:store :database
:db {:datasource #ig/ref :db.sql/connection}
:migrate-on-init? true}
:reitit.routes/ui {:base-path "",
:env #ig/ref :system/env}}