feat: initial commit

This commit is contained in:
2022-10-03 09:59:21 +02:00
parent 35d6accafb
commit abfaf19c47
53 changed files with 2173 additions and 153 deletions

25
backend/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM maven:3.8.6-eclipse-temurin-17 as builder
WORKDIR /src
COPY . /src
RUN mvn clean package
WORKDIR /app
RUN cp /src/target/bousole-pluss-backend*.jar bousole-pluss-backend.jar
RUN java -Djarmode=layertools -jar bousole-pluss-backend.jar extract
FROM eclipse-temurin:17-jre-alpine
EXPOSE 8080
USER root
RUN addgroup -S pluss && adduser -S pluss -G pluss
ENV CORS_ALLOWED_ORIGINS=$CORS_ALLOWED_ORIGINS
USER pluss:pluss
WORKDIR /app
COPY --chown=pluss:pluss --from=builder /app/dependencies/ ./
COPY --chown=pluss:pluss --from=builder /app/snapshot-dependencies/ ./
COPY --chown=pluss:pluss --from=builder /app/spring-boot-loader/ ./
COPY --chown=pluss:pluss --from=builder /app/application/ ./
ENTRYPOINT java org.springframework.boot.loader.JarLauncher