aboutsummaryrefslogtreecommitdiff
path: root/env/prod
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2018-02-17 13:55:55 -0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2018-02-17 13:55:55 -0200
commit98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa (patch)
tree61f453e1b21634e0f2d740ff61091d182e145184 /env/prod
downloadqueue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.tar.gz
queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.tar.bz2
queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.zip
Initial commit
Diffstat (limited to 'env/prod')
-rw-r--r--env/prod/clj/queue_api/env.clj11
-rw-r--r--env/prod/resources/config.edn2
-rw-r--r--env/prod/resources/logback.xml24
3 files changed, 37 insertions, 0 deletions
diff --git a/env/prod/clj/queue_api/env.clj b/env/prod/clj/queue_api/env.clj
new file mode 100644
index 0000000..c05d732
--- /dev/null
+++ b/env/prod/clj/queue_api/env.clj
@@ -0,0 +1,11 @@
+(ns queue-api.env
+ (:require [clojure.tools.logging :as log]))
+
+(def defaults
+ {:init
+ (fn []
+ (log/info "\n-=[queue-api started successfully]=-"))
+ :stop
+ (fn []
+ (log/info "\n-=[queue-api has shut down successfully]=-"))
+ :middleware identity})
diff --git a/env/prod/resources/config.edn b/env/prod/resources/config.edn
new file mode 100644
index 0000000..b48cfbd
--- /dev/null
+++ b/env/prod/resources/config.edn
@@ -0,0 +1,2 @@
+{:production true
+ :port 3000}
diff --git a/env/prod/resources/logback.xml b/env/prod/resources/logback.xml
new file mode 100644
index 0000000..3829eff
--- /dev/null
+++ b/env/prod/resources/logback.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <statusListener class="ch.qos.logback.core.status.NopStatusListener" />
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>log/queue-api.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>log/queue-api.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>100MB</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <!-- keep 30 days of history -->
+ <maxHistory>30</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <charset>UTF-8</charset>
+ <pattern>%date{ISO8601} [%thread] %-5level %logger{36} - %msg %n</pattern>
+ </encoder>
+ </appender>
+ <logger name="org.apache.http" level="warn" />
+ <logger name="org.xnio.nio" level="warn" />
+ <root level="INFO">
+ <appender-ref ref="FILE" />
+ </root>
+</configuration>