Skip to content

Commit

Permalink
Add opensearch compose
Browse files Browse the repository at this point in the history
  • Loading branch information
acetousk committed Aug 31, 2024
1 parent a7e7df2 commit bf45976
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions docker/opensearch-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# A Docker Compose application with Moqui, Postgres, OpenSearch, OpenSearch Dashboards, and virtual hosting through
# nginx-proxy supporting multiple moqui instances on different hostnames.

# Run with something like this for detached mode:
# $ docker compose -f moqui-postgres-compose.yml -p moqui up -d
# Or to copy runtime directories for mounted volumes, set default settings, etc use something like this:
# $ ./compose-run.sh moqui-postgres-compose.yml
# This sets the project/app name to 'moqui' and the network will be 'moqui_default', to be used by external moqui containers

# Test locally by adding the virtual host to /etc/hosts or with something like:
# $ curl -H "Host: moqui.local" localhost/Login

# To run an additional instance of moqui run something like this (but with
# many more arguments for volume mapping, db setup, etc):
# $ docker run -e VIRTUAL_HOST=moqui2.local --name moqui2_local --network moqui_default moqui

# To import data from the docker host using port 5432 mapped for 127.0.0.1 only use something like this:
# $ psql -h 127.0.0.1 -p 5432 -U moqui -W moqui < pg-dump.sql

version: "2"
services:
moqui-search:
image: opensearchproject/opensearch:2.4.0
container_name: moqui-search
restart: always
ports:
# change this as needed to bind to any address or even comment to not expose port outside containers
- 127.0.0.1:9200:9200
- 127.0.0.1:9300:9300
volumes:
- /etc/localtime:/etc/localtime:ro
# edit these as needed to map configuration and data storage
- ./opensearch/data/nodes:/usr/share/opensearch/data/nodes
# - ./opensearch/config/opensearch.yml:/usr/share/opensearch/config/opensearch.yml
# - ./opensearch/logs:/usr/share/opensearch/logs
environment:
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
- network.host=_site_
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536

opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2.4.0
container_name: opensearch-dashboards
volumes:
- /etc/localtime:/etc/localtime:ro
links:
- moqui-search
environment:
OPENSEARCH_HOSTS: '["https://moqui-search:9200"]'

0 comments on commit bf45976

Please sign in to comment.