From 8beb727d24f7654d953d0435aacf6d671446573c Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Fri, 16 Feb 2024 20:07:01 +0000 Subject: [PATCH] make meilisearch optional --- compose.meilisearch.yml | 27 +++++++++++++++++++++++++++ compose.yml | 23 +++++++---------------- 2 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 compose.meilisearch.yml diff --git a/compose.meilisearch.yml b/compose.meilisearch.yml new file mode 100644 index 0000000..cd7d78f --- /dev/null +++ b/compose.meilisearch.yml @@ -0,0 +1,27 @@ +--- +version: "3.8" + +services: + app: + depends_on: + - search + environment: + - SEARCH_MEILI_INSTANCE=http://${STACK_NAME}_search:7700 + + search: + image: getmeili/meilisearch:latest + secrets: + - meili_master_key + volumes: + - "search-data:/data.ms" + networks: + - internal + entrypoint: ["tini", "--", "/docker-entrypoint.sh", "/bin/meilisearch"] + configs: + - source: app_entrypoint + target: /docker-entrypoint.sh + mode: 0555 + +volumes: + search-data: + diff --git a/compose.yml b/compose.yml index f86508c..72eb560 100644 --- a/compose.yml +++ b/compose.yml @@ -11,10 +11,8 @@ services: max-file: "10" depends_on: - db - - search environment: - POSTGRES_HOST=${STACK_NAME}_db - - SEARCH_MEILI_INSTANCE=http://${STACK_NAME}_search:7700 - POSTGRES_USER=postgres - POSTGRES_DB=bonfire_db - PUBLIC_PORT=443 @@ -34,6 +32,9 @@ services: - APP_NAME - PLUG_SERVER + - DB_SLOW_QUERY_MS + - DB_STATEMENT_TIMEOUT + - MAIL_BACKEND - MAIL_DOMAIN - MAIL_FROM @@ -48,6 +49,10 @@ services: - MAIL_PASSWORD - SENTRY_DSN + - OTEL_ENABLED + - OTEL_SERVICE_NAME + - OTEL_HONEYCOMB_API_KEY + - OTEL_LIGHTSTEP_API_KEY - WEB_PUSH_SUBJECT - WEB_PUSH_PUBLIC_KEY @@ -128,23 +133,9 @@ services: # - /tmp:size=${DB_MEMORY_LIMIT} #entrypoint: ['tail', '-f', '/dev/null'] # uncomment when the Postgres DB is corrupted and won't start - search: - image: getmeili/meilisearch:latest - secrets: - - meili_master_key - volumes: - - "search-data:/data.ms" - networks: - - internal - entrypoint: ["tini", "--", "/docker-entrypoint.sh", "/bin/meilisearch"] - configs: - - source: app_entrypoint - target: /docker-entrypoint.sh - mode: 0555 volumes: db-data: - search-data: upload-data: networks: