Revision fc90b8ca7d43f10fd9acee4985b89446c87d1801 authored by Kathy Tran on 12 January 2024, 01:41:05 UTC, committed by Kathy Tran on 12 January 2024, 01:41:05 UTC
1 parent 0c6564c
Raw File
docker-compose.yml
#this file sets up elasticsearch, kibana, and postgres containers for running dockstore locally
#dockstore can run  without elasticsearch but the search page requires elasticsearch to be running
#kibana can be used alongside elasticsearch as a visual interface for the indices and send queries directly
#this only brings up the postgres container, not the actual database
version: '2.2'
services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
    container_name: es01
    environment:
      - node.name=es01
      - cluster.name=es-docker-cluster
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      # The max_content_length value on AWS OpenSearch is dependent on instance type
      # https://docs.aws.amazon.com/opensearch-service/latest/developerguide/limits.html#network-limits
      - http.max_content_length=10mb
      - xpack.security.enabled=false
      - xpack.monitoring.enabled=false
      - xpack.graph.enabled=false
      - xpack.watcher.enabled=false
      - xpack.ml.enabled=false
      - script.allowed_types= none
      - script.allowed_contexts= none
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - elastic
  # uncomment to run a kibana instance
  # kib01:
    # image: docker.elastic.co/kibana/kibana:6.8.3
    # container_name: kib01
    # ports:
      # - 5601:5601
    # environment:
      # ELASTICSEARCH_URL: http://es01:9200
      # ELASTICSEARCH_HOSTS: http://es01:9200
    # networks:
      # - elastic
  postgres_db:
    image: postgres:13.7
    command: postgres -c jit=off
    container_name: postgres1
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
    ports:
      - "5432:5432"
    volumes:
      - db_data:/var/lib/postgresql/data
  localstack:
    image: localstack/localstack:1.3.1
    container_name: localstack1
    # Specify the localstack profile if you want to run localstack
    # Ex: docker compose --profile localstack up -d
    profiles:
      - localstack
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
      - "127.0.0.1:4510-4559:4510-4559"  # external services port range
    environment:
      - DEBUG=${DEBUG-}
      - LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR-}
      - PROVIDER_OVERRIDE_S3=asf # Need this so that S3 key encoding works. Remove when there's a new localstack release https://github.com/localstack/localstack/issues/7374#issuecomment-1360950643
      - DOCKER_HOST=unix:///var/run/docker.sock
    volumes:
      - localstack_data:/var/lib/localstack
      - "/var/run/docker.sock:/var/run/docker.sock"

volumes:
  data01:
    driver: local
  db_data:
  localstack_data:

networks:
  elastic:
    driver: bridge
back to top