Skip to content
This repository was archived by the owner on Jan 24, 2026. It is now read-only.

Commit 8d173f6

Browse files
committed
Initial commit
0 parents  commit 8d173f6

9 files changed

Lines changed: 127 additions & 0 deletions

File tree

.dockerignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
**/.classpath
2+
**/.dockerignore
3+
**/.env
4+
**/.git
5+
**/.gitignore
6+
**/.project
7+
**/.settings
8+
**/.toolstarget
9+
**/.vs
10+
**/.vscode
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/azds.yaml
15+
**/charts
16+
**/docker-compose*
17+
**/Dockerfile*
18+
**/node_modules
19+
**/npm-debug.log
20+
**/obj
21+
**/secrets.dev.yaml
22+
**/values.dev.yaml
23+
.gradle/**
24+
LICENSE
25+
README.md
26+
build/**
27+
!build/install/**
28+
run/**

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Gradle
2+
.gradle/**
3+
build/**
4+
5+
# JetBrains
6+
.idea/**
7+
**.iml
8+
out/**
9+
10+
# Java
11+
**.jar
12+
**.class

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Using OpenJDK11
2+
FROM adoptopenjdk/openjdk11:alpine
3+
RUN adduser -h /app -D exec
4+
5+
ADD ./build/install/%Project_Name% /app/binaries
6+
VOLUME /app/data
7+
8+
# Permission Management
9+
RUN chown -R exec:exec /app/*
10+
RUN chmod -R 777 /app/*
11+
USER exec
12+
WORKDIR /app
13+
14+
RUN ls -AlhX
15+
16+
# GO
17+
ENTRYPOINT /app/binaries/bin/%Project_Name%

build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'application'
2+
3+
group '%groupid%'
4+
version '%version%'
5+
6+
apply from: 'gradle/ext.gradle'
7+
8+
sourceCompatibility = 1.8
9+
targetCompatibility = 1.8
10+
mainClassName = '%mainclass%'
11+
12+
wrapper {
13+
gradleVersion = '5.6'
14+
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
15+
}
16+
17+
apply from: 'gradle/docker.gradle'
18+
19+
tasks.withType(JavaCompile) {
20+
options.encoding = 'UTF-8'
21+
options.incremental = true
22+
}
23+
24+
repositories.jcenter()
25+
26+
dependencies {
27+
}

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "2.0"
2+
3+
services:
4+
cobalton:
5+
image: %project_name%:public
6+
container_name: %project_name%-public
7+
restart: on-failure
8+
build:
9+
context: .
10+
dockerfile: Dockerfile
11+
volumes:
12+
- /var/bots/%Project_Name%:/app/data:rw
13+
working_dir: /app
14+
entrypoint: /app/binaries/bin/%Project_Name%

gradle/docker.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
task dockerCompose(type: Exec, dependsOn: ['installDist', 'dockerDestroy']) {
2+
executable = 'docker-compose'
3+
args = ['up', '-d', '--build', '--force-recreate']
4+
}
5+
6+
task dockerDestroy(dependsOn: ['dockerStop', 'dockerRemove'])
7+
8+
task dockerStop(type: Exec) {
9+
executable = 'docker'
10+
args = ['stop', dockerContainerName]
11+
}
12+
13+
task dockerRemove(type: Exec) {
14+
executable = 'docker'
15+
args = ['rm', dockerContainerName]
16+
}
17+
18+
tasks.findByName('dockerRemove').mustRunAfter('dockerStop')

gradle/ext.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ext {
2+
dockerContainerName = '%dockerContainerName%'
3+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Nov 01 05:44:30 CET 2019
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
3+
distributionBase=GRADLE_USER_HOME
4+
distributionPath=wrapper/dists
5+
zipStorePath=wrapper/dists
6+
zipStoreBase=GRADLE_USER_HOME

settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rootProject.name = '%Root_Project_Name%'
2+

0 commit comments

Comments
 (0)