Skip to content

Commit

Permalink
fix docker compose setup to actually run
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Nov 16, 2023
1 parent 249ba7e commit ef81264
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
10 changes: 2 additions & 8 deletions examples/docker/.env
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# This env file work out-of-the-box with the opensearch example docker-compose setup as documented here:
# https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/#sample-docker-composeyml
# Be aware to increase max virtual memory map in your system before: `sysctl -w vm.max_map_count=262144`
# Follow the instructios and start the opensearch docker-compose setup.
# Then `source .env` and start the ingest-service with: celery -A collective.elastic.ingest.celery.app worker -l debug

export MAPPINGS_FILE=configurations/mappings.json
# This env file work out-of-the-box with the opensearch example docker-compose setup

export INDEX_SERVER=opensearch:9200
export INDEX_USE_SSL=1
Expand All @@ -14,7 +8,7 @@ export INDEX_PASSWORD=admin

export CELERY_BROKER=redis://redis:6379/0

export PLONE_SERVICE=http://localhost:8080
export PLONE_SERVICE=http://`ip route get 8.8.8.8 | grep -oP 'src \K[^ ]+'`:8080
export PLONE_PATH=Plone
export PLONE_USER=admin
export PLONE_PASSWORD=admin
24 changes: 19 additions & 5 deletions examples/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,32 @@ services:

ingest:
image: ghcr.io/collective/collective.elastic.ingest:latest
environment:
MAPPINGS_FILE: ${MAPPINGS_FILE}
ANALYIS_FILE: ${ANALYIS_FILE}
PREPROCESSING_FILE: ${PREPROCESSING_FILE}
INDEX_SERVER: ${INDEX_SERVER?unset}
INDEX_USE_SSL: ${INDEX_USE_SSL?unset}
INDEX_OPENSEARCH: ${INDEX_OPENSEARCH?unset}
INDEX_LOGIN: ${INDEX_LOGIN?unset}
INDEX_PASSWORD: ${INDEX_PASSWORD?unset}
CELERY_BROKER: ${CELERY_BROKER?unset}
CELERY_CONCURRENCY: ${CELERY_CONCURRENCY}
CELEREY_LOG_LEVEL: ${CELERY_LOG_LEVEL}
PLONE_SERVICE: ${PLONE_SERVICE?unset}
PLONE_PATH: ${PLONE_PATH?unset}
PLONE_USER: ${PLONE_USER?unset}
PLONE_PASSWORD: ${PLONE_PASSWORD?unset}
SENTRY_DSN: ${SENTRY_DSN}
volumes:
- ingest-configuration:/configuration
networks:
- default
- opensearch-net

redis:
image: 'redis:latest'
networks:
- backend
- opensearch-net
ports:
- 6379:6379

Expand Down Expand Up @@ -55,13 +71,11 @@ services:
volumes:
opensearch-data:
ingest-configuration:
driver: local
driver_opts:
type: none
device: ./configuration
o: bind
networks:
opensearch-net:
default:
external: true
name: container_network

0 comments on commit ef81264

Please sign in to comment.