This repository has been archived by the owner on Apr 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 89080bb
Showing
56 changed files
with
12,329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/target | ||
/lib | ||
/classes | ||
/checkouts | ||
pom.xml | ||
dev-config.edn | ||
test-config.edn | ||
*.jar | ||
*.class | ||
/.lein-* | ||
profiles.clj | ||
/.env | ||
.nrepl-port | ||
/log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
# | ||
# Name of the base image. Capstan will download this automatically from | ||
# Cloudius S3 repository. | ||
# | ||
#base: cloudius/osv | ||
base: cloudius/osv-openjdk8 | ||
|
||
# | ||
# The command line passed to OSv to start up the application. | ||
# | ||
cmdline: /java.so -jar /flexblock/app.jar | ||
|
||
# | ||
# The command to use to build the application. | ||
# You can use any build tool/command (make/rake/lein/boot) - this runs locally on your machine | ||
# | ||
# For Leiningen, you can use: | ||
#build: lein uberjar | ||
# For Boot, you can use: | ||
#build: boot build | ||
|
||
# | ||
# List of files that are included in the generated image. | ||
# | ||
files: | ||
/flexblock/app.jar: ./target/uberjar/flexblock.jar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM java:8-alpine | ||
MAINTAINER Your Name <[email protected]> | ||
|
||
ADD target/uberjar/flexblock.jar /flexblock/app.jar | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["java", "-jar", "/flexblock/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: java -cp target/uberjar/flexblock.jar clojure.main -m flexblock.core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# flexblock | ||
|
||
generated using Luminus version "2.9.12.25" | ||
|
||
FIXME | ||
|
||
## Prerequisites | ||
|
||
You will need [Leiningen][1] 2.0 or above installed. | ||
|
||
[1]: https://github.com/technomancy/leiningen | ||
|
||
## Running | ||
|
||
To start a web server for the application, run: | ||
|
||
lein run | ||
|
||
## License | ||
|
||
Copyright © 2018 FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(ns flexblock.dev-middleware | ||
(:require [ring.middleware.reload :refer [wrap-reload]] | ||
[selmer.middleware :refer [wrap-error-page]] | ||
[prone.middleware :refer [wrap-exceptions]])) | ||
|
||
(defn wrap-dev [handler] | ||
(-> handler | ||
wrap-reload | ||
wrap-error-page | ||
wrap-exceptions)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(ns flexblock.env | ||
(:require [selmer.parser :as parser] | ||
[clojure.tools.logging :as log] | ||
[flexblock.dev-middleware :refer [wrap-dev]])) | ||
|
||
(def defaults | ||
{:init | ||
(fn [] | ||
(parser/cache-off!) | ||
(log/info "\n-=[flexblock started successfully using the development profile]=-")) | ||
:stop | ||
(fn [] | ||
(log/info "\n-=[flexblock has shut down successfully]=-")) | ||
:middleware wrap-dev}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(ns flexblock.figwheel | ||
(:require [figwheel-sidecar.repl-api :as ra])) | ||
|
||
(defn start-fw [] | ||
(ra/start-figwheel!)) | ||
|
||
(defn stop-fw [] | ||
(ra/stop-figwheel!)) | ||
|
||
(defn cljs [] | ||
(ra/cljs-repl)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(ns user | ||
(:require | ||
[mount.core :as mount] | ||
[flexblock.figwheel :refer [start-fw stop-fw cljs]] | ||
[flexblock.core :refer [start-app]])) | ||
|
||
(defn start [] | ||
(mount/start-without #'flexblock.core/repl-server)) | ||
|
||
(defn stop [] | ||
(mount/stop-except #'flexblock.core/repl-server)) | ||
|
||
(defn restart [] | ||
(stop) | ||
(start)) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(ns ^:figwheel-no-load flexblock.app | ||
(:require [flexblock.core :as core] | ||
[devtools.core :as devtools])) | ||
|
||
(enable-console-print!) | ||
|
||
(devtools/install!) | ||
|
||
(core/init!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{:dev true | ||
:port 3000 | ||
;; when :nrepl-port is set the application starts the nREPL server on load | ||
:nrepl-port 7000} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<statusListener class="ch.qos.logback.core.status.NopStatusListener" /> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<!-- encoders are assigned the type | ||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> | ||
<encoder> | ||
<charset>UTF-8</charset> | ||
<pattern>%date{ISO8601} [%thread] %-5level %logger{36} - %msg %n</pattern> | ||
</encoder> | ||
</appender> | ||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>log/flexblock.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<fileNamePattern>log/flexblock.%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" /> | ||
<logger name="io.undertow.session" level="warn" /> | ||
<logger name="io.undertow.request" level="warn" /> | ||
<root level="DEBUG"> | ||
<appender-ref ref="STDOUT" /> | ||
<appender-ref ref="FILE" /> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(ns flexblock.env | ||
(:require [clojure.tools.logging :as log])) | ||
|
||
(def defaults | ||
{:init | ||
(fn [] | ||
(log/info "\n-=[flexblock started successfully]=-")) | ||
:stop | ||
(fn [] | ||
(log/info "\n-=[flexblock has shut down successfully]=-")) | ||
:middleware identity}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(ns flexblock.app | ||
(:require [flexblock.core :as core])) | ||
|
||
;;ignore println statements in prod | ||
(set! *print-fn* (fn [& _])) | ||
|
||
(core/init!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{:production true | ||
:port 3000} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/flexblock.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<fileNamePattern>log/flexblock.%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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{:dev true | ||
:port 3000 | ||
;; when :nrepl-port is set the application starts the nREPL server on load | ||
:nrepl-port 7000} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<statusListener class="ch.qos.logback.core.status.NopStatusListener" /> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<!-- encoders are assigned the type | ||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> | ||
<encoder> | ||
<charset>UTF-8</charset> | ||
<pattern>%date{ISO8601} [%thread] %-5level %logger{36} - %msg %n</pattern> | ||
</encoder> | ||
</appender> | ||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>log/flexblock.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<fileNamePattern>log/flexblock.%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" /> | ||
<logger name="io.undertow.session" level="warn" /> | ||
<logger name="io.undertow.request" level="warn" /> | ||
<root level="DEBUG"> | ||
<appender-ref ref="STDOUT" /> | ||
<appender-ref ref="FILE" /> | ||
</root> | ||
</configuration> |
Oops, something went wrong.