Skip to content

Commit

Permalink
Merge pull request #2 from fga-eps-mds/fix/connection-microsservices
Browse files Browse the repository at this point in the history
fix: connection microservices network
  • Loading branch information
Matheusafonsouza authored Oct 22, 2023
2 parents 64c7f6d + ee947a2 commit 1886163
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,47 @@ services:
build:
context: .
dockerfile: Dockerfile
hostname: gestao
ports:
- "8001:8000"
- "8001:8001"
volumes:
- .:/app/src/
- .:/app/src/
restart: always
env_file:
- .env
- .env
depends_on:
- db
- db
environment:
GESTAO_HOST: 0.0.0.0
GESTAO_PORT: 8001
GESTAO_DB_HOST: gestao-db
GESTAO_DB_PORT: 5432
GESTAO_DB_USER: gestao
GESTAO_DB_PASS: gestao
GESTAO_DB_BASE: gestao
GESTAO_RELOAD: "True"
networks:
- sindpol_network

db:
image: postgres
hostname: gestao-db
ports:
- "5433:5432"
- "5433:5432"
environment:
POSTGRES_PASSWORD: "gestao"
POSTGRES_USER: "gestao"
POSTGRES_DB: "gestao"
volumes:
- gestao-db-data:/var/lib/postgresql/data
- gestao-db-data:/var/lib/postgresql/data
restart: always
healthcheck:
test: pg_isready -U gestao
interval: 2s
timeout: 3s
retries: 40
networks:
- sindpol_network

migrator:
build:
Expand All @@ -54,8 +60,15 @@ services:
GESTAO_DB_PASS: gestao
GESTAO_DB_BASE: gestao
depends_on:
- db
- db
networks:
- sindpol_network

volumes:
gestao-db-data:
name: gestao-db-data

networks:
sindpol_network:
external: true
driver: 'bridge'

0 comments on commit 1886163

Please sign in to comment.