Skip to content

Commit

Permalink
docker compose compatível com wsl
Browse files Browse the repository at this point in the history
  • Loading branch information
luizpais committed Feb 24, 2024
1 parent b591d74 commit 1323d8d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 131 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>dev.quarkusclub</groupId>
<artifactId>rinha-de-backend-bank</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<properties>
<compiler-plugin.version>3.12.1</compiler-plugin.version>
<maven.compiler.release>21</maven.compiler.release>
Expand Down
20 changes: 10 additions & 10 deletions quarkusclub/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ services:
#image: luizpais/rinha-de-backend-bank:1.0.1
hostname: api01
environment:
- DB_URL=vertx-reactive:postgresql://127.0.0.1:5432/dbrinha
- DB_URL=vertx-reactive:postgresql://db:5432/dbrinha
- DB_USER_NAME=rinha
- DB_PASSWORD=backend
- DB_REACTIVE_MAX=10
- DB_LOG_LEVEL=OFF
- SERVER_PORT=8088
ports:
- "8088:8088"
network_mode: host
# network_mode: host
depends_on:
db:
condition: service_healthy
Expand All @@ -29,15 +29,15 @@ services:
<<: *api
hostname: api02
environment:
- DB_URL=vertx-reactive:postgresql://127.0.0.1:5432/dbrinha
- DB_URL=vertx-reactive:postgresql://db:5432/dbrinha
- DB_USER_NAME=rinha
- DB_PASSWORD=backend
- DB_REACTIVE_MAX=10
- DB_LOG_LEVEL=OFF
- SERVER_PORT=8089
ports:
- "8089:8089"
network_mode: host
# network_mode: host

nginx:
image: nginx:latest
Expand All @@ -49,7 +49,7 @@ services:
ports:
# Obrigatório expor/usar a porta 9999 no load balancer!
- "9999:9999"
network_mode: host
# network_mode: host
deploy:
resources:
limits:
Expand All @@ -65,7 +65,7 @@ services:
- POSTGRES_DB=dbrinha
ports:
- "5432:5432"
network_mode: host
#network_mode: host
volumes:
- ./sql/script.sql:/docker-entrypoint-initdb.d/script.sql
command: postgres -c checkpoint_timeout=600 -c max_wal_size=4096 -c synchronous_commit=0 -c full_page_writes=0
Expand All @@ -80,7 +80,7 @@ services:
timeout: 5s
retries: 20
start_period: 10s
#networks:
# default:
# driver: bridge
# name: rinha-nginx-2024q1
networks:
default:
driver: bridge
name: rinha-nginx-2024q1
1 change: 1 addition & 0 deletions quarkusclub/extrato
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"saldo":{"total":0,"data_extrato":"2024-02-24T22:43:21.471984","limite":100000},"ultimas_transacoes":[]}
6 changes: 3 additions & 3 deletions quarkusclub/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ events {
}

http {
access_log on ;
access_log on;
sendfile on;

upstream api {
least_conn;
server 127.0.0.1:8088;
server 127.0.0.1:8089;
server api01:8088;
server api02:8089;
}

server {
Expand Down
61 changes: 0 additions & 61 deletions run/docker-compose.yml

This file was deleted.

23 changes: 0 additions & 23 deletions run/nginx.conf

This file was deleted.

33 changes: 0 additions & 33 deletions run/script.sql

This file was deleted.

0 comments on commit 1323d8d

Please sign in to comment.