resource-watch/aqueduct-analysis-microservice

View on GitHub
docker-compose-test.yml

Summary

Maintainability
Test Coverage
version: "3"
services:
  test:
    build: .
    ports:
      - "5100:5100"
    container_name: aqueduct_analysis-test
    environment:
      PORT: 5700
      ENVIRONMENT: dev
      DEBUG: "True"
      MICROSERVICE_TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjU4MjBhZDk0NjlhMDI4Nzk4MmY0Y2QxOCIsInByb3ZpZGVyIjoibG9jYWwiLCJwcm92aWRlcklkIjpudWxsLCJlbWFpbCI6InNlcmdpby5nb3JkaWxsb0B2aXp6dWFsaXR5LmNvbSIsInJvbGUiOiJBRE1JTiIsImNyZWF0ZWRBdCI6IjIwMTYtMTEtMDdUMTY6MzY6MzYuODY4WiIsImV4dHJhVXNlckRhdGEiOnsiYXBwcyI6WyJnZnciLCJwcmVwIiwiYXF1ZWR1Y3QiLCJmb3Jlc3QtYXRsYXMiLCJydyIsImRhdGE0c2RnIl19fQ.3GzuhG8wD4gI5Fo6NTqHC_Dq6ChKPPWXygga2mAuKZw
      POSTGRES_URL: postgresql://postgres@postgres:5432/flood
      GATEWAY_URL: http://mymachine:9000
      LOCAL_URL: http://mymachine:5700
      REDIS_URL: redis://supply-chain-redis-test
      AWS_REGION: "us-east-1"
      REQUIRE_API_KEY: "True"
    command: test
    depends_on:
      - postgres
      - supply-chain-worker-test

  postgres:
    image: postgres:9.6.12
    container_name: aqueduct-postgres
    ports:
      - "5432"
    environment:
      POSTGRES_DB: flood

  supply-chain-worker-test:
    build: .
    container_name: aqueduct_analysis-supply-chain-worker-test
    environment:
      REDIS_URL: redis://supply-chain-redis-test
    command: ["python3", "aqueduct/workers/supply-chain-worker.py"]
    depends_on:
      - supply-chain-redis-test

  supply-chain-redis-test:
    container_name: supply-chain-redis-test
    image: redis:5-alpine
    expose: ["6379"]