feat: Add Gitea pipelines for frontend and backend
This commit is contained in:
15
legalconsenthub-backend/.dockerignore
Normal file
15
legalconsenthub-backend/.dockerignore
Normal file
@@ -0,0 +1,15 @@
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
*.md
|
||||
.gradle
|
||||
build
|
||||
bin
|
||||
!gradle/wrapper
|
||||
postgres-data
|
||||
docker-compose.yaml
|
||||
.idea
|
||||
.vscode
|
||||
*.log
|
||||
*.iml
|
||||
|
||||
34
legalconsenthub-backend/Dockerfile
Normal file
34
legalconsenthub-backend/Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
|
||||
WORKDIR /workspace/app
|
||||
|
||||
COPY gradlew .
|
||||
COPY gradle gradle
|
||||
COPY build.gradle .
|
||||
COPY settings.gradle .
|
||||
COPY api api
|
||||
|
||||
RUN chmod +x ./gradlew
|
||||
|
||||
RUN ./gradlew dependencies --no-daemon
|
||||
|
||||
COPY src src
|
||||
|
||||
RUN ./gradlew bootJar -x test --no-daemon
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN addgroup -S spring && adduser -S spring -G spring
|
||||
USER spring:spring
|
||||
|
||||
COPY --from=builder /workspace/app/build/libs/*.jar app.jar
|
||||
|
||||
ENV SPRING_PROFILES_ACTIVE=prod
|
||||
ENV JAVA_OPTS="-Xms256m -Xmx512m"
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app/app.jar"]
|
||||
|
||||
Reference in New Issue
Block a user