diff --git a/Dockerfile b/Dockerfile index bcb285c..ef34a9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:8-jessie +FROM node:18-bullseye LABEL maintainer="Emerson Rocha " # see https://github.com/nodejs/docker-node#how-to-use-this-image @@ -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 \ diff --git a/README.md b/README.md index 7e73d30..a75f676 100644 --- a/README.md +++ b/README.md @@ -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/ + + --> \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index effc9c0..47917a0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: @@ -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