diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/config.clj | 18 | ||||
| -rwxr-xr-x | src/utils.clj | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/config.clj b/src/config.clj index bec5768..3ee165d 100755 --- a/src/config.clj +++ b/src/config.clj @@ -25,45 +25,45 @@ (contains? #{"1" "true" "yes" "on"} (.toLowerCase v)))))) (def *server-url* - (getenv "DUMPFM_SERVER_URL" + (getenv "HUMPFM_SERVER_URL" (if (= *server-user* "humpfmprod") "/" "http://localhost:8080"))) (def *public-host* - (getenv "DUMPFM_PUBLIC_HOST" + (getenv "HUMPFM_PUBLIC_HOST" (try (.getHost (URL. *server-url*)) (catch Exception _ "")))) (def *public-scheme* - (getenv "DUMPFM_PUBLIC_SCHEME" + (getenv "HUMPFM_PUBLIC_SCHEME" (try (.getProtocol (URL. *server-url*)) (catch Exception _ "http")))) (def *cookie-domain* - (getenv "DUMPFM_COOKIE_DOMAIN" + (getenv "HUMPFM_COOKIE_DOMAIN" (if (= *server-user* "humpfmprod") ".hump.fm" ""))) (def *passwordless-login* - (getenv-bool "DUMPFM_PASSWORDLESS_LOGIN" false)) + (getenv-bool "HUMPFM_PASSWORDLESS_LOGIN" false)) (def db-server - (getenv "DUMPFM_DB_HOST" + (getenv "HUMPFM_DB_HOST" (if (= *server-user* "humpfmprod") "localhost"; "192.168.162.138" "localhost"))) (def redis-server - {:host (getenv "DUMPFM_REDIS_HOST" + {:host (getenv "HUMPFM_REDIS_HOST" (if (= *server-user* "humpfmprod") "127.0.0.1" "127.0.0.1")) - :port (getenv-int "DUMPFM_REDIS_PORT" 6379) - :db (getenv-int "DUMPFM_REDIS_DB" 0)}) + :port (getenv-int "HUMPFM_REDIS_PORT" 6379) + :db (getenv-int "HUMPFM_REDIS_DB" 0)}) (def *root-directory* (System/getProperty "user.dir")) (def *image-directory* "images") diff --git a/src/utils.clj b/src/utils.clj index 0be144c..b5a4eaa 100755 --- a/src/utils.clj +++ b/src/utils.clj @@ -24,10 +24,10 @@ config )) -(let [db-name (or (System/getenv "DUMPFM_DB_NAME") "humpfm") - db-user (or (System/getenv "DUMPFM_DB_USER") "postgres") - db-pass (or (System/getenv "DUMPFM_DB_PASSWORD") "") - db-port (let [p (System/getenv "DUMPFM_DB_PORT")] +(let [db-name (or (System/getenv "HUMPFM_DB_NAME") "humpfm") + db-user (or (System/getenv "HUMPFM_DB_USER") "postgres") + db-pass (or (System/getenv "HUMPFM_DB_PASSWORD") "") + db-port (let [p (System/getenv "HUMPFM_DB_PORT")] (if p (Integer/parseInt p) 5432))] (def *db* {:datasource (doto (new PGPoolingDataSource) (.setServerName db-server) |
