From c851d92e327c0fa357065f444b5e305fb18c7883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kol=C3=A1=C5=99?= Date: Sun, 26 Nov 2023 22:34:29 +0100 Subject: [PATCH 1/9] feat(wiki): use local db instead of elastic --- docker-compose.override.yml | 12 -- docker-compose.prod.yml | 5 - docker-compose.yml | 34 +---- .../fiesta/parts/navigation_items.html | 8 +- wiki/Gemfile | 1 + wiki/fetcher.rb | 130 +++++++----------- 6 files changed, 59 insertions(+), 131 deletions(-) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index a573cfe7..98ca166c 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -39,18 +39,6 @@ services: volumes: - ./legacy.sql:/docker-entrypoint-initdb.d/legacy.sql - elastic: - volumes: - - ./elastic/elastic.yml:/usr/share/elasticsearch/config/elasticsearch.yml - - ./conf/elastic/elasticsearch.keystore:/usr/share/elasticsearch/config/elasticsearch.keystore - - ./conf/certs:/usr/share/elasticsearch/config/certs - - kibana: - volumes: - - ./elastic/kibana.yml:/usr/share/kibana/config/kibana.yml - - ./conf/certs:/etc/kibana/certs - wikifetcher: volumes: - ./wiki/:/usr/src/app/ - - ./conf/certs:/usr/share/certs diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index f11f33bd..4e4948d6 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -22,13 +22,8 @@ services: ports: - "80:80" - "443:443" - # TODO: figure out before deployment, whereever/where should be certs stored volumes: - ./conf/certs:/etc/nginx/certs - # remove profiles so production env does have filled elastic search -# elastic: -# profiles: [ ] - # wikifetcher: # profiles: [ ] diff --git a/docker-compose.yml b/docker-compose.yml index 0e74c2ba..6d8a10dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: - web volumes: - web_media_files:/var/media - - wiki_static_files:/var/wiki + - wiki_data:/var/wiki - /var/run/docker.sock:/var/run/docker.sock environment: PROXY_HOSTNAME_TARGET: "web" @@ -98,46 +98,20 @@ services: ports: - "4306:3306" - elastic: - image: elasticsearch:7.17.0 - profiles: [ "wiki" ] - volumes: - - elastic_data:/usr/share/elasticsearch/data - ports: - - "9200" - - kibana: - image: kibana:7.17.0 - profiles: [ "wiki" ] - depends_on: - - elastic - ports: - - "5601" - env_file: - - ./wiki/.env.base - - ./.env - environment: - VIRTUAL_HOST: kibana.${ROOT_DOMAIN} - VIRTUAL_PORT: 5601 - wikifetcher: build: ./wiki - profiles: [ "wiki" ] - # when elastic is not ready yet, try it again restart: on-failure - depends_on: - - elastic volumes: - - wiki_static_files:/usr/src/static +# - wiki_data:/usr/src/static + - ./wiki/data:/usr/src/static env_file: - .env - wiki/.env.base volumes: postgres15_data: - elastic_data: legacydb_data: webpack_build: web_static_files: web_media_files: - wiki_static_files: + wiki_data: diff --git a/fiesta/templates/fiesta/parts/navigation_items.html b/fiesta/templates/fiesta/parts/navigation_items.html index efcd3cb5..53f426e1 100644 --- a/fiesta/templates/fiesta/parts/navigation_items.html +++ b/fiesta/templates/fiesta/parts/navigation_items.html @@ -1,8 +1,8 @@