Created
January 23, 2025 14:30
-
-
Save jaydorsey/5aea3a3e5a9fc41d3d493b16a3c754ed to your computer and use it in GitHub Desktop.
localstack + opensearch + opensearch-dashboards docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# NOTE: This was, for some reason, way too hard for me to piece together quickly | |
services: | |
opensearch: | |
container_name: opensearch | |
image: opensearchproject/opensearch:latest | |
environment: | |
- node.name=opensearch | |
- cluster.name=opensearch-docker-cluster | |
- discovery.type=single-node | |
- bootstrap.memory_lock=true | |
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" | |
- "DISABLE_INSTALL_DEMO_CONFIG=true" # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch | |
- "DISABLE_SECURITY_PLUGIN=true" | |
ports: | |
- "9200:9200" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
volumes: | |
- data01:/usr/share/opensearch/data | |
localstack: | |
image: localstack/localstack:latest | |
container_name: localstack | |
ports: | |
- "4566:4566" # LocalStack edge port | |
- "127.0.0.1:4510-4559:4510-4559" # external services port range | |
depends_on: | |
- opensearch | |
environment: | |
- SERVICES=opensearch,s3 | |
- DEBUG=1 | |
- OPENSEARCH_CUSTOM_BACKEND=http://opensearch:9200 | |
volumes: | |
- "/var/run/docker.sock:/var/run/docker.sock" | |
opensearch-dashboards: | |
image: opensearchproject/opensearch-dashboards:latest | |
container_name: opensearch-dashboards | |
ports: | |
- "5601:5601" # OpenSearch Dashboards port | |
expose: | |
- "5601" | |
environment: | |
- 'OPENSEARCH_HOSTS=["http://opensearch:9200"]' # Connect to OpenSearch in LocalStack | |
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true" | |
depends_on: | |
- localstack | |
volumes: | |
data01: | |
driver: local | |
# Run: docker compose up --build -d | |
# | |
# Then, attached to the localstack container, run: | |
# | |
# awslocal opensearch create-domain --domain-name test-domain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment