-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from franklaercio/test-unit-integrate
Adding code to main
- Loading branch information
Showing
27 changed files
with
1,475 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Arquivos e diretórios relacionados ao Maven | ||
target/ | ||
mvnw | ||
.mvn/ | ||
mvn/ | ||
*.jar | ||
|
||
# Arquivos de sistema e temporários | ||
.DS_Store | ||
.idea/ | ||
*.iml | ||
*.log | ||
*.log.* | ||
log/ | ||
logs/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM maven:3.9.5-eclipse-temurin-21 AS build | ||
RUN mkdir /src | ||
COPY . /src | ||
WORKDIR /src | ||
RUN mvn clean install -DskipTests | ||
|
||
FROM eclipse-temurin:21.0.1_12-jdk | ||
|
||
EXPOSE 8080 | ||
ENV TZ="UTC" | ||
RUN mkdir /app | ||
COPY --from=build /src/target/*.jar /app/app.jar | ||
ENTRYPOINT ["java", "-jar", "/app/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Getting Started | ||
|
||
### Reference Documentation | ||
For further reference, please consider the following sections: | ||
|
||
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) | ||
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.2.2/maven-plugin/reference/html/) | ||
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.2.2/maven-plugin/reference/html/#build-image) | ||
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/3.2.2/reference/htmlsingle/index.html#using.devtools) | ||
* [Spring Reactive Web](https://docs.spring.io/spring-boot/docs/3.2.2/reference/htmlsingle/index.html#web.reactive) | ||
|
||
### Guides | ||
The following guides illustrate how to use some features concretely: | ||
|
||
* [Building a Reactive RESTful Web Service](https://spring.io/guides/gs/reactive-rest-service/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
# rinha-de-backend-2024-q1 | ||
# Rinha de Backend 2024 Q1 | ||
|
||
__Nome__: Frank Laércio | ||
|
||
__Tecnologias__: | ||
- Java | ||
- Spring WebFlux | ||
- PostgreSQL | ||
- NGINX | ||
|
||
__Link Repositório__: https://github.com/franklaercio/rinha-de-backend-2024-q1 | ||
|
||
__LinkedIn__: https://www.linkedin.com/in/frank-laercio/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
version: "3.5" | ||
|
||
services: | ||
api01: &api | ||
# Lembre-se de que seu serviço HTTP deve estar hospedado num repositório | ||
# publicamente acessível! Ex.: hub.docker.com | ||
build: | ||
context: . | ||
hostname: api01 | ||
environment: | ||
- DB_HOSTNAME=db | ||
- POSTGRES_DB=rinha | ||
- POSTGRES_USER=admin | ||
- POSTGRES_PASSWORD=123 | ||
ports: | ||
- "8081:8080" | ||
depends_on: | ||
- db | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: "0.35" | ||
memory: "160MB" | ||
|
||
api02: | ||
<<: *api | ||
hostname: api02 | ||
environment: | ||
- DB_HOSTNAME=db | ||
ports: | ||
- "8082:8080" | ||
|
||
nginx: | ||
image: nginx:latest | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf:ro | ||
depends_on: | ||
- api01 | ||
- api02 | ||
ports: | ||
- "9999:9999" | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: "0.2" | ||
memory: "30MB" | ||
|
||
db: | ||
image: postgres:latest | ||
hostname: db | ||
environment: | ||
- POSTGRES_PASSWORD=123 | ||
- POSTGRES_USER=admin | ||
- POSTGRES_DB=rinha | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- ./script.sql:/docker-entrypoint-initdb.d/script.sql | ||
command: 'postgres -c max_connections=1000 -c work_mem=8MB -c hot_standby=off -c shared_buffers=135MB -c checkpoint_timeout=1d -c wal_level=minimal -c synchronous_commit=off -c fsync=off -c full_page_writes=off -c max_wal_senders=0' | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: "0.7" | ||
memory: "150MB" | ||
|
||
networks: | ||
default: | ||
driver: bridge | ||
name: rinha-nginx-2024q1 |
Oops, something went wrong.