-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
19 changed files
with
928 additions
and
22 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
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
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
This file was deleted.
Oops, something went wrong.
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
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,69 @@ | ||
env: | ||
global: | ||
- TERM=dumb | ||
|
||
language: java | ||
jdk: oraclejdk8 | ||
|
||
service: | ||
- docker | ||
|
||
addons: | ||
apt: | ||
update: true | ||
packages: | ||
- libappindicator1 | ||
- fonts-liberation | ||
- bash | ||
- curl | ||
- libxml2-utils | ||
- docker-ce | ||
- google-chrome-stable | ||
|
||
install: true | ||
before_install: | ||
- nvm install lts/* | ||
- export CHROME_BIN=/usr/bin/google-chrome | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash) | ||
- stop_any 8080 80 | ||
- sudo add-apt-repository universe -y | ||
- sudo apt-get update -yqq | ||
- sudo apt-get install -yqq --no-install-suggests --no-install-recommends tree jq python-pip | ||
- sudo pip install docker-compose httpie >/dev/null 2>&1 | ||
|
||
script: | ||
- export root=$(pwd) | ||
# | ||
- ./sbtw clean compile assembly test run | ||
- java -jar target/scala-2.12/<%= projectDirectory %>-assembly-0.0.1.jar | ||
|
||
before_deploy: | ||
- cd ${root} | ||
- ./mvnw -Pdocs | ||
- mkdir -p ./target/generated-docs | ||
- cp -Rf ./target/generated-docs/index.html ./target/generated-docs/404.html | ||
|
||
deploy: | ||
provider: pages | ||
skip-cleanup: true | ||
# travis encrypt GITHUB_TOKEN=<your github repo token> --add | ||
github-token: "$GITHUB_TOKEN" | ||
keep-history: true | ||
on: | ||
branch: master | ||
local-dir: target/generated-docs | ||
target_branch: gh-pages | ||
|
||
before_cache: | ||
- for item in $(find ~/.gradle -name "*.lock"); | ||
do sudo rm -rf $item ; | ||
done | ||
|
||
cache: | ||
directories: | ||
- $HOME/.m2 | ||
- $HOME/.sbt | ||
- $HOME/.gradle | ||
- $HOME/.docker |
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,36 @@ | ||
FROM openjdk:8u171-jre-alpine3.8 | ||
MAINTAINER Maksim Kostromin https://github.com/daggerok | ||
RUN apk --no-cache --update add busybox-suid bash curl unzip sudo openssh-client shadow wget \ | ||
&& adduser -h /home/appuser -s /bin/bash -D -u 1025 appuser wheel \ | ||
&& echo 'appuser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ | ||
&& sed -i 's/.*requiretty$/Defaults !requiretty/' /etc/sudoers \ | ||
&& wget --no-cookies \ | ||
--no-check-certificate \ | ||
--header 'Cookie: oraclelicense=accept-securebackup-cookie' \ | ||
'http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip' \ | ||
-O /tmp/jce_policy-8.zip \ | ||
&& unzip -o /tmp/jce_policy-8.zip -d /tmp \ | ||
&& mv -f ${JAVA_HOME}/lib/security ${JAVA_HOME}/lib/backup-security || echo 'nothing to backup' \ | ||
&& mv -f /tmp/UnlimitedJCEPolicyJDK8 ${JAVA_HOME}/lib/security \ | ||
&& apk del busybox-suid unzip openssh-client shadow wget \ | ||
&& rm -rf /var/cache/apk/* /tmp/* | ||
USER appuser | ||
WORKDIR /home/appuser | ||
VOLUME /home/appuser | ||
ARG JAVA_OPTS_ARGS='\ | ||
-Djavax.net.debug=ssl \ | ||
-Djava.net.preferIPv4Stack=true \ | ||
-XX:+UnlockExperimentalVMOptions \ | ||
-XX:+UseCGroupMemoryLimitForHeap \ | ||
-XshowSettings:vm ' | ||
ENV JAVA_OPTS="${JAVA_OPTS} ${JAVA_OPTS_ARGS}" | ||
#ENTRYPOINT java ${JAVA_OPTS} -jar ./app.jar | ||
ENTRYPOINT java -jar ./app.jar | ||
CMD /bin/bash | ||
#EXPOSE 8080 | ||
#HEALTHCHECK --timeout=1s \ | ||
# --retries=66 \ | ||
# CMD curl -f http://127.0.0.1:8080/actuator/health || exit 1 | ||
#COPY --chown=appuser ./target/scala-2.12/<%= projectDirectory %>-*.jar | ||
#COPY --chown=appuser ./target/scala-2.12/*-assembly-*.jar ./app.jar | ||
COPY --chown=appuser ./target/scala-2.12/<%= projectDirectory %>-assembly-*.jar ./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,25 @@ | ||
= <%= projectDirectory %> | ||
|
||
//// | ||
image:https://travis-ci.org/daggerok/<%= projectDirectory %>.svg?branch=master["Build Status", link="https://travis-ci.org/daggerok/<%= projectDirectory %>"] | ||
image:https://gitlab.com/daggerok/<%= projectDirectory %>/badges/master/build.svg["Build Status", link="https://gitlab.com/daggerok/<%= projectDirectory %>/-/jobs"] | ||
image:https://img.shields.io/bitbucket/pipelines/daggerok/<%= projectDirectory %>.svg["Build Status", link="https://bitbucket.com/daggerok/<%= projectDirectory %>"] | ||
//// | ||
|
||
//tag::content[] | ||
|
||
- scala: 2.12 | ||
- akka: 2.5.14 | ||
//Read link:https://daggerok.github.io/<%= projectDirectory %>[project reference documentation] | ||
|
||
.build | ||
[source,bash] | ||
---- | ||
./sbtw clean compile test assembly run | ||
target/scala-2.12/<%= projectDirectory %>-assembly-0.0.1.jar | ||
---- | ||
|
||
Initially generated by using link:https://github.com/daggerok/generator-jvm/[generator-jvm] yeoman generator (scala-sbt) | ||
|
||
//end::content[] |
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,23 @@ | ||
name := "<%= projectDirectory %>" | ||
|
||
lazy val scalacticVersion = "3.0.5" | ||
lazy val scalatestVersion = "3.0.5" | ||
|
||
lazy val commonSettings = Seq( | ||
version := "0.0.1", | ||
organization := "com.github.daggerok", | ||
scalaVersion := "2.12.6", | ||
test in assembly := {} | ||
) | ||
|
||
lazy val root = (project in file(".")) | ||
.settings(commonSettings: _*) | ||
.settings( | ||
mainClass in assembly := Some("daggerok.Application"), | ||
// more settings here ... | ||
) | ||
|
||
libraryDependencies ++= Seq( | ||
"org.scalactic" %% "scalactic" % scalacticVersion % "test", | ||
"org.scalatest" %% "scalatest" % scalatestVersion % "test", | ||
) |
18 changes: 18 additions & 0 deletions
18
generators/app/templates/scala-sbt/docker-compose-sbt.yaml
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,18 @@ | ||
version: '2.1' | ||
|
||
services: | ||
|
||
<%= projectDirectory %>: | ||
build: . | ||
volumes: ['<%= projectDirectory %>-data:/home/appuser'] | ||
networks: [backing-services] | ||
#ports: ["8080:8080"] | ||
#restart: unless-stopped | ||
#mem_limit: 209715200 # container limit: 200Mb (200 * 1024 * 1024) | ||
|
||
volumes: | ||
<%= projectDirectory %>-data: {} | ||
|
||
networks: | ||
backing-services: | ||
driver: bridge |
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,115 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation=" | ||
http://maven.apache.org/POM/4.0.0 | ||
http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.github.daggerok</groupId> | ||
<artifactId><%= projectDirectory %></artifactId> | ||
<version>0.0.1</version> | ||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>${maven.compiler.target}</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.asciidoctor</groupId> | ||
<artifactId>asciidoctor-maven-plugin</artifactId> | ||
<version>1.5.6</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.asciidoctor</groupId> | ||
<artifactId>asciidoctorj-pdf</artifactId> | ||
<version>1.5.0-alpha.16</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.asciidoctor</groupId> | ||
<artifactId>asciidoctorj-diagram</artifactId> | ||
<version>1.5.4</version> | ||
</dependency> | ||
</dependencies> | ||
<configuration> | ||
<outputDirectory>target/generated-docs</outputDirectory> | ||
<sourceDirectory>docs</sourceDirectory> | ||
<relativeBaseDir>true</relativeBaseDir> | ||
<headerFooter>true</headerFooter> | ||
<imagesDir>.</imagesDir><!-- Don't know why, but yes - use base sources dir... --> | ||
<attributes> | ||
<headerFooter>true</headerFooter> | ||
<toc>left</toc> | ||
<linkcss>false</linkcss> | ||
<doctype>book</doctype> | ||
<ruby>erubis</ruby> | ||
<encoding>${project.build.sourceEncoding}</encoding> | ||
<linkattrs>true</linkattrs> | ||
<numbered>true</numbered> | ||
<sectanchors>true</sectanchors> | ||
<sectlink>true</sectlink> | ||
<idprefix/> | ||
<docinfo1/> | ||
<icons>font</icons> | ||
<idseparator>-</idseparator> | ||
<setanchors>true</setanchors> | ||
<toc-title>Table of Contents</toc-title> | ||
<project-name>${project.artifactId}</project-name> | ||
<root-project-name>${project.artifactId}</root-project-name> | ||
<project-version>${project.version}</project-version> | ||
<github-url>https://github.com/daggerok/${project.artifactId}</github-url> | ||
</attributes> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>output-html</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>process-asciidoc</goal> | ||
</goals> | ||
<configuration> | ||
<backend>html</backend> | ||
<sourceHighlighter>highlightjs</sourceHighlighter> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>output-docbook</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>process-asciidoc</goal> | ||
</goals> | ||
<configuration> | ||
<backend>docbook</backend> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>output-pdf-doc</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>process-asciidoc</goal> | ||
</goals> | ||
<configuration> | ||
<backend>pdf</backend> | ||
<sourceHighlighter>coderay</sourceHighlighter> | ||
<requires> | ||
<require>asciidoctor-diagram</require> | ||
<require>coderay</require> | ||
</requires> | ||
<attributes> | ||
<icons>font</icons> | ||
<pagenums/> | ||
</attributes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
|
||
<defaultGoal>clean process-resources</defaultGoal> | ||
</build> | ||
</project> |
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 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.7") |
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 @@ | ||
sbt.version = 1.2.1 |
Oops, something went wrong.