Skip to content
Open
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
133 changes: 34 additions & 99 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,104 +1,39 @@
# Logs
logs
# ===== Java =====
*.class
*.log
*.ctxt

# ===== Maven =====
target/
!.mvn/wrapper/maven-wrapper.jar

# ===== Spring Boot =====
*.jar
*.war
*.ear
*.iml

# ===== IDEs =====
.idea/
.vscode/
*.swp
*.swo

# ===== OS =====
.DS_Store
Thumbs.db

# ===== Logs =====
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
# ===== Environment =====
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/
.env.local

# DynamoDB Local files
.dynamodb/
# ===== Docker =====
**/docker-data/

# TernJS port file
.tern-port
# ===== Kafka (local) =====
kafka-data/
zookeeper-data/
31 changes: 31 additions & 0 deletions Dockerfile.antifraud
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ===== Etapa de build =====
FROM maven:3.9.12-eclipse-temurin-21-alpine AS build

WORKDIR /antifraud

# Copiar POM directamente al WORKDIR
COPY ./yape-financial/yape-antifraud/pom.xml ./pom.xml

# Descargar dependencias sin compilar (aprovecha cache de Docker)
RUN mvn dependency:go-offline -B

# Copiar el código fuente
COPY ./yape-financial/yape-antifraud/src ./src

# Compilar microservicio (tests omitidos)
RUN mvn clean package -DskipTests=true


# ===== Etapa runtime =====
FROM eclipse-temurin:21-jdk-alpine

WORKDIR /antifraud

# Copiar jar construido desde la etapa de build
COPY --from=build /antifraud/target/yape-antifraud-1.0-SNAPSHOT.jar .

# Exponer puerto del microservicio
EXPOSE 8082

# Ejecutar la aplicación
ENTRYPOINT ["java", "-jar", "yape-antifraud-1.0-SNAPSHOT.jar"]
27 changes: 27 additions & 0 deletions Dockerfile.transaction
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ===== Etapa de build =====
FROM maven:3.9.12-eclipse-temurin-21-alpine AS build

# Directorio de trabajo dentro del contenedor
WORKDIR /transaction

# Copiar POM y código fuente directamente al WORKDIR
COPY ./yape-financial/yape-transaction/pom.xml ./pom.xml
COPY ./yape-financial/yape-transaction/src ./src

# Compilar el microservicio (skip tests para acelerar)
RUN mvn clean package -DskipTests=true


# ===== Etapa runtime =====
FROM eclipse-temurin:21-jdk

WORKDIR /transaction

# Copiar jar construido desde la etapa de build
COPY --from=build /transaction/target/yape-transaction-1.0-SNAPSHOT.jar .

# Exponer puerto del microservicio
EXPOSE 8081

# Ejecutar la aplicación
ENTRYPOINT ["java", "-jar", "yape-transaction-1.0-SNAPSHOT.jar"]
Loading