Skip to content

Commit

Permalink
#45: updated docker compose image of elasticsearch and mongodb; still…
Browse files Browse the repository at this point in the history
… need to work around the main Dockerfile
  • Loading branch information
fititnt committed Jul 10, 2023
1 parent 22de1ce commit 4da9818
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
27 changes: 20 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:8-jessie
FROM node:18-bullseye
LABEL maintainer="Emerson Rocha <[email protected]>"

# see https://github.com/nodejs/docker-node#how-to-use-this-image
Expand All @@ -11,16 +11,29 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
libpng-dev \
poppler-utils

RUN curl -fsSL https://pgp.mongodb.com/server-4.2.asc | \
gpg -o /usr/share/keyrings/mongodb-server-4.2.gpg \
--dearmor

RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.2.gpg ] http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list
RUN apt-get update
RUN apt-get install -y mongodb-org-shell mongodb-org-tools
RUN apt-get clean && rm -rf /var/lib/apt/lists/*


# Install mongo & mongorestore (this is used only for database initialization, not on runtime)
# So much space need, see 'After this operation, 184 MB of additional disk space will be used.'
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list \
&& apt-get update \
&& apt-get install -y mongodb-org-shell mongodb-org-tools \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 20691EEC35216C63CAF66CE1656408E390CFB1F5 \
# && echo "deb http://repo.mongodb.org/apt/debian bullseye/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list \
# RUN echo "deb http://repo.mongodb.org/apt/debian bullseye/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list \
# && apt-get update \
# && apt-get install -y mongodb-org-shell mongodb-org-tools \
# && apt-get clean && rm -rf /var/lib/apt/lists/*

# ## Download Uwazi v1.4
# RUN git clone -b v1.4 --single-branch --depth=1 https://github.com/huridocs/uwazi.git /home/node/uwazi/ \
## Download Uwazi v1.4
RUN git clone -b v1.4 --single-branch --depth=1 https://github.com/huridocs/uwazi.git /home/node/uwazi/ \
RUN git clone -b production --single-branch --depth=1 https://github.com/huridocs/uwazi.git /home/node/uwazi/ \
&& chown node:node -R /home/node/uwazi/ \
&& cd /home/node/uwazi/ \
&& yarn install \
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,14 @@ instead of Public Domain unlicense.
#0 4.000 404 Not Found
(...)
- Potential problems
- https://github.com/nodejs/docker-node/issues/1916
- https://github.com/nodejs/docker-node/issues/1918
- EOL debian
- https://endoflife.date/debian
- Mongo 4.2
- https://repo.mongodb.org/apt/debian/dists/bullseye/mongodb-org/
-->
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ services:
- mongo

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.3
# image: docker.elastic.co/elasticsearch/elasticsearch:5.5.3
# Based on https://github.com/huridocs/uwazi/releases/tag/1.123.2 . Please update this part in future
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.6
restart: unless-stopped
command: elasticsearch -Expack.security.enabled=false -Ecluster.name=docker-cluster -Ehttp.port=9200 -Ehttp.cors.allow-origin="http://localhost:51000" -Ehttp.cors.enabled=true -Ehttp.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization -Ehttp.cors.allow-credentials=true
environment:
Expand Down Expand Up @@ -51,7 +53,9 @@ services:
- elasticsearch

mongo:
image: mongo:3.4
# image: mongo:3.4
# Based on https://github.com/huridocs/uwazi/releases/tag/1.123.2 . Please update this part in future
image: mongo:4.2
restart: unless-stopped
volumes:
# - ./data/mongo:/data/db
Expand Down

0 comments on commit 4da9818

Please sign in to comment.