docker setup

This commit is contained in:
2025-07-20 08:55:02 +02:00
parent 1b1ec919af
commit 575c4b1c1c
3 changed files with 38 additions and 1 deletions
+4 -1
View File
@@ -37,4 +37,7 @@ build/
.vscode/
### Mac OS ###
.DS_Store
.DS_Store
### Docker ###
docker-compose.override.yml
+21
View File
@@ -0,0 +1,21 @@
FROM maven:3.9.4-eclipse-temurin-21-alpine AS build
LABEL authors="youhavetrouble"
WORKDIR /app
# Copy Maven wrapper and project files
COPY . .
# Build the JAR file
RUN mvn clean package
# Runtime image
FROM eclipse-temurin:21-jre
WORKDIR /app
# Copy the built JAR from the build stage
COPY --from=build /app/target/Inviter.jar Inviter.jar
RUN chmod 755 Inviter.jar
# Run the JAR file
CMD ["java", "-jar", "Inviter.jar"]
+13
View File
@@ -0,0 +1,13 @@
services:
inviter:
build:
context: .
dockerfile: Dockerfile
container_name: inviter
stdin_open: true
tty: true
ports:
- "8080:8080"
volumes:
- ./data:/app/data
environment: []