Files
ToBePlayed-Core/Dockerfile
T
lobo 04dcab45da
Build, Test & Push Core Service / quality-check (push) Successful in 42s
Build, Test & Push Core Service / docker (push) Successful in 2m4s
Initial project setup: CI, Docker & configs
Add project bootstrap for build, CI/CD, and local development. Introduces Maven Wrapper (mvnw, mvnw.cmd, .mvn/wrapper), multi-stage Dockerfile, docker-compose files (compose.yaml, docker-compose.dev.yml), .env, banner and README. Adds Gitea Actions workflow to build, test and push container images. Update application.yml (port -> 8090, virtual threads, API versioning, management/actuator/prometheus settings, Steam API config) and add application-dev.yml for local overrides. Extend pom.xml with caching, observability (actuator, micrometer/prometheus), testing/dev dependencies (testcontainers, devtools, additional spring test modules) to support CI and local testing.
2026-04-19 10:44:29 +02:00

35 lines
1.1 KiB
Docker

# ------------------------------------------------------------------
# STAGE 1: Build the application using Maven Wrapper
# ------------------------------------------------------------------
FROM eclipse-temurin:25-jdk-alpine AS builder
WORKDIR /app
# Copy the Maven wrapper and pom.xml first to cache dependencies
COPY .mvn/ .mvn
COPY mvnw pom.xml ./
# Make the wrapper executable (just in case) and download dependencies
RUN chmod +x mvnw
RUN ./mvnw dependency:go-offline
# Copy the actual source code and build the application (skip tests in Docker,
# as they will be run by the Gitea Action before the build)
COPY src ./src
RUN ./mvnw clean package -DskipTests
# ------------------------------------------------------------------
# STAGE 2: Create the minimal runtime image
# ------------------------------------------------------------------
FROM eclipse-temurin:25-jre-alpine
WORKDIR /app
# Expose the port your Spring Boot app runs on
EXPOSE 8090
# Copy the compiled jar file from the builder stage
COPY --from=builder /app/target/*.jar app.jar
# Run the application
ENTRYPOINT ["java", "-jar", "app.jar"]