| |
| |
| |
| |
| version: "3.9" |
|
|
| services: |
|
|
| |
| elasticsearch: |
| image: docker.elastic.co/elasticsearch/elasticsearch:8.12.2 |
| container_name: es_juridico |
| environment: |
| - discovery.type=single-node |
| - xpack.security.enabled=false |
| - xpack.security.enrollment.enabled=false |
| - ES_JAVA_OPTS=-Xms512m -Xmx512m |
| ports: |
| - "9200:9200" |
| volumes: |
| - esdata:/usr/share/elasticsearch/data |
| healthcheck: |
| test: ["CMD-SHELL", "curl -sf http://0.0.0.09200/_cluster/health | python3 -c \"import sys,json; s=json.load(sys.stdin)['status']; sys.exit(0 if s in ['green','yellow'] else 1)\""] |
| interval: 10s |
| timeout: 10s |
| retries: 15 |
| start_period: 60s |
| networks: |
| - juridico_net |
|
|
| |
| api: |
| build: |
| context: . |
| dockerfile: Dockerfile |
| container_name: api_juridico |
| environment: |
| - ES_HOST=http://elasticsearch:9200 |
| - ES_INDEX=assuntos_juridicos |
| - PORT=7860 |
| - APP_ENV=development |
| - WORKERS=1 |
| ports: |
| - "7860:7860" |
| depends_on: |
| elasticsearch: |
| condition: service_healthy |
| volumes: |
| - ./app:/app/app |
| - ./data:/app/data |
| networks: |
| - juridico_net |
| restart: unless-stopped |
|
|
| volumes: |
| esdata: |
|
|
| networks: |
| juridico_net: |
|
|