Skip to content

Commit

Permalink
viniciusfcf 99%
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusfcf committed Feb 7, 2024
1 parent adfb0ae commit e845cae
Show file tree
Hide file tree
Showing 25 changed files with 15 additions and 1,632 deletions.
1 change: 0 additions & 1 deletion participantes/viniciusfcf/.mvn/wrapper/.gitignore

This file was deleted.

98 changes: 0 additions & 98 deletions participantes/viniciusfcf/.mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

18 changes: 0 additions & 18 deletions participantes/viniciusfcf/.mvn/wrapper/maven-wrapper.properties

This file was deleted.

2 changes: 0 additions & 2 deletions participantes/viniciusfcf/build.sh

This file was deleted.

30 changes: 13 additions & 17 deletions participantes/viniciusfcf/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,30 @@ services:
# Lembre-se de que seu serviço HTTP deve estar hospedado num repositório
# publicamente acessível! Ex.: hub.docker.com
image: viniciusfcf/rinha-backend-2024q1:latest
hostname: api01
network_mode: "host"
network_mode: host
environment:
- QUARKUS_HTTP_PORT=8081
- QUARKUS_DATASOURCE_JDBC_MAX_SIZE=3
- QUARKUS_DATASOURCE_JDBC_MIN_SIZE=3
- QUARKUS_DATASOURCE_JDBC_INITIAL_SIZE=3
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.25"
cpus: "0.4"
memory: "100MB"
ulimits:
nproc: 65535
nofile:
soft: 1000000
hard: 1000000

api02:
# Essa sintaxe reusa o que foi declarado em 'api01'.
<<: *api
hostname: api02
environment:
- QUARKUS_HTTP_PORT=8082

nginx:
image: nginx:latest
network_mode: "host"
network_mode: host
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
Expand All @@ -45,28 +41,28 @@ services:
memory: "50MB"

db:
image: postgres:latest
hostname: db
image: postgres:16.1
command: postgres -c 'max_connections=15' -c 'fsync=off' -c 'synchronous_commit=off' -c 'checkpoint_timeout=1d' -c 'full_page_writes=false'
environment:
- POSTGRES_PASSWORD=123
- POSTGRES_USER=admin
- POSTGRES_DB=rinha
command: postgres -c 'max_connections=30'
network_mode: "host"
network_mode: host
volumes:
- ./import.sql:/docker-entrypoint-initdb.d/script.sql
- ./postgres-data:/var/lib/postgresql/data
deploy:
resources:
limits:
# Note que a soma de todos os limites dos serviços
# aqui declarados é de 1.5 unidades de CPU e 550MB
# de memória. A distribuição feita aqui é apenas
# um exemplo – distribua como quiser.
cpus: "0.8"
memory: "100MB"
cpus: "0.5"
memory: "150MB"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 5s
interval: 10s
timeout: 5s
retries: 20
start_period: 10s
Expand Down
Loading

0 comments on commit e845cae

Please sign in to comment.