Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
293 changes: 293 additions & 0 deletions .dockergitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,293 @@
# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos,git,java,gradle,intellij+all,eclipse
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,macos,git,java,gradle,intellij+all,eclipse

### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# CDT- autotools
.autotools

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Annotation Processing
.apt_generated/
.apt_generated_test/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project

### Eclipse Patch ###
# Spring Boot Tooling
.sts4-cache/

### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig

# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

# Sonarlint plugin
.idea/sonarlint

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see https://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

### Gradle ###
.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Gradle Patch ###
**/build/

# End of https://www.toptal.com/developers/gitignore/api/windows,linux,macos,git,java,gradle,intellij+all,eclipse

lombok.config
cacti-uploads

docker/Dockerfile*
13 changes: 8 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ WORKDIR /src

RUN set -o errexit -o nounset \
&& chmod +x ./gradlew \
&& ./gradlew :luna-main:shadowJar :luna-main:assemble --stacktrace --no-daemon
&& ./gradlew clean :luna-main:shadowJar :luna-main:assemble --stacktrace --no-daemon

FROM eclipse-temurin:${JVM_VERSION}-jdk-jammy AS jre
ARG JVM_VERSION

COPY --from=builder /src/luna-main/build/libs/luna-main-*-all.jar /src/luna.jar
WORKDIR /src

COPY --from=builder /src/luna-main/build/libs/luna-main-*-all.jar luna.jar

RUN set -o errexit -o nounset \
&& jdeps \
--ignore-missing-deps \
Expand All @@ -37,10 +36,13 @@ RUN set -o errexit -o nounset \

FROM eclipse-temurin:${JVM_VERSION}-jdk-jammy AS extractor

# the following line has to and with a slash, becuase <from> contains multiple files
COPY --from=builder /src/luna-main/build/libs/luna-main-*.jar /src/
WORKDIR /src

COPY --from=builder /src/luna-main/build/libs/luna-main-*.jar luna.jar
RUN java -Djarmode=layertools -jar luna.jar extract
RUN rm -rf ./luna-main-*-all.jar ./luna-main-*-plain.jar ./luna-main-*-aot.jar \
&& mv luna-main-*.jar luna.jar \
&& java -Djarmode=layertools -jar luna.jar extract

FROM ubuntu:jammy

Expand Down Expand Up @@ -76,6 +78,7 @@ ENV JAVA_APP_DIR=${DATA_DIR}
ENV JAVA_MAIN_CLASS=org.springframework.boot.loader.JarLauncher
ENV JAVA_APP_NAME=luna
ENV JAVA_CLASSPATH=/opt/luna
ENV JAVA_OPTIONS="-DspringAot=true"

USER ${LUNA_USER}:${LUNA_GROUP}
VOLUME ${DATA_DIR}
Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.github-actions
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ RUN set -o errexit -o nounset \

FROM eclipse-temurin:${JVM_VERSION}-jdk-jammy AS extractor

# the following line has to and with a slash, becuase <from> contains multiple files
COPY ./luna-main-*.jar /src/
WORKDIR /src

COPY ./luna-main-*.jar .
RUN rm -rf ./luna-main-*-all.jar ./luna-main-*-plain.jar \
&& ls \
RUN rm -rf ./luna-main-*-all.jar ./luna-main-*-plain.jar ./luna-main-*-aot.jar \
&& mv luna-main-*.jar luna.jar \
&& java -Djarmode=layertools -jar luna.jar extract

Expand Down Expand Up @@ -66,6 +66,7 @@ ENV JAVA_APP_DIR=${DATA_DIR}
ENV JAVA_MAIN_CLASS=org.springframework.boot.loader.JarLauncher
ENV JAVA_APP_NAME=luna
ENV JAVA_CLASSPATH=/opt/luna
ENV JAVA_OPTIONS="-DspringAot=true"

USER ${LUNA_USER}:${LUNA_GROUP}
VOLUME ${DATA_DIR}
Expand Down
Loading