From eb0c7034c2eff5198c4e001598a84de40346c50f Mon Sep 17 00:00:00 2001 From: Matheus Afonso Date: Thu, 19 Oct 2023 20:33:24 -0300 Subject: [PATCH] chore: setup ports for gestao db --- .github/workflows/tests.yml | 3 +-- README.md | 2 +- docker-compose.yml | 8 +++++--- gestao/settings.py | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 12ab794..06c3985 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,6 @@ jobs: pytest: runs-on: ubuntu-latest services: - gestao-db: image: postgres:13.8-bullseye env: @@ -61,7 +60,7 @@ jobs: --health-timeout=5s --health-retries=5 ports: - - 5432:5432 + - 5433:5432 steps: - uses: actions/checkout@v2 - name: Set up Python diff --git a/README.md b/README.md index c4c66b9..3a06ec1 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ For running tests on your local machine. I prefer doing it with docker: ``` -docker run -p "5432:5432" -e "POSTGRES_PASSWORD=gestao" -e "POSTGRES_USER=gestao" -e "POSTGRES_DB=gestao" postgres:13.8-bullseye +docker run -p "5433:5432" -e "POSTGRES_PASSWORD=gestao" -e "POSTGRES_USER=gestao" -e "POSTGRES_DB=gestao" postgres:13.8-bullseye ``` diff --git a/docker-compose.yml b/docker-compose.yml index a7bb4f7..3144160 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: Dockerfile ports: - - "8000:8000" + - "8001:8000" volumes: - .:/app/src/ restart: always @@ -17,7 +17,7 @@ services: environment: GESTAO_HOST: 0.0.0.0 GESTAO_DB_HOST: gestao-db - GESTAO_DB_PORT: 5432 + GESTAO_DB_PORT: 5433 GESTAO_DB_USER: gestao GESTAO_DB_PASS: gestao GESTAO_DB_BASE: gestao @@ -26,6 +26,8 @@ services: db: image: postgres hostname: gestao-db + ports: + - "5433:5432" environment: POSTGRES_PASSWORD: "gestao" POSTGRES_USER: "gestao" @@ -47,7 +49,7 @@ services: command: alembic upgrade head environment: GESTAO_DB_HOST: gestao-db - GESTAO_DB_PORT: 5432 + GESTAO_DB_PORT: 5433 GESTAO_DB_USER: gestao GESTAO_DB_PASS: gestao GESTAO_DB_BASE: gestao diff --git a/gestao/settings.py b/gestao/settings.py index 9bcaf65..002a934 100644 --- a/gestao/settings.py +++ b/gestao/settings.py @@ -40,7 +40,7 @@ class Settings(BaseSettings): log_level: LogLevel = LogLevel.INFO # Variables for the database db_host: str = "localhost" - db_port: int = 5432 + db_port: int = 5433 db_user: str = "gestao" db_pass: str = "gestao" db_base: str = "gestao"