# Containers needed to test all backend services locally
version: '3.7'

services:
  httpbin:
    image: kennethreitz/httpbin
    container_name: httpbin
    ports:
      - '8080:80'

  dynamodb:
    image: amazon/dynamodb-local
    container_name: dynamodb-test
    ports:
      - '8000:8000'
    command: '-jar DynamoDBLocal.jar -inMemory'
    environment:
      AWS_ACCESS_KEY_ID: 'placeholder'
      AWS_SECRET_ACCESS_KEY: 'placeholder'
    working_dir: '/home/dynamodblocal'

  mongo:
    image: mongo
    container_name: mongo-test
    environment:
      MONGO_INITDB_DATABASE: 'requests_cache_pytest'
    ports:
      - '27017:27017'
    volumes:
      - 'mongodb_data:/data/db'

  redis:
    container_name: redis-test
    image: docker.io/bitnami/redis
    ports:
      - '6379:6379'
    environment:
      ALLOW_EMPTY_PASSWORD: 'yes'
    volumes:
      - 'redis_data:/bitnami/redis/data'

volumes:
  mongodb_data:
    driver: local
  redis_data:
    driver: local
