diff --git a/couchdb-nouveau/Dockerfile b/couchdb-nouveau/Dockerfile new file mode 100644 index 00000000000..14277ddee04 --- /dev/null +++ b/couchdb-nouveau/Dockerfile @@ -0,0 +1,19 @@ +FROM couchdb:3.4.1-nouveau AS base + +# temporary fix https://github.com/apache/couchdb/issues/5262 +RUN apt-get update && apt-get install -y wget unzip +RUN wget https://github.com/user-attachments/files/17186496/nouveau-1.0-SNAPSHOT-4299acf4.jar.zip -O /tmp/nouveau-4299acf4.jar.zip +RUN unzip /tmp/nouveau-4299acf4.jar.zip -d /tmp + +FROM couchdb:3.4.1-nouveau + +COPY --chown=nouveau:nouveau --from=base /tmp/nouveau-1.0-SNAPSHOT-4299acf4.jar /opt/nouveau/lib/nouveau-1.0-SNAPSHOT.jar +COPY --chown=nouveau:nouveau nouveau.yaml /opt/nouveau/etc/nouveau.yaml + +VOLUME /data/nouveau + +# 5987: Nouveau App +# 5989: Nouveau Admin +EXPOSE 5987 5989 + +LABEL Authors="MEDIC SRE TEAM" diff --git a/couchdb-nouveau/nouveau.yaml b/couchdb-nouveau/nouveau.yaml new file mode 100644 index 00000000000..351bec8c0f3 --- /dev/null +++ b/couchdb-nouveau/nouveau.yaml @@ -0,0 +1,27 @@ +maxIndexesOpen: 3000 +commitIntervalSeconds: 30 +idleSeconds: 60 +rootDir: ./data/nouveau + +logging: + level: INFO + +server: + applicationConnectors: + - type: http + bindHost: 0.0.0.0 + port: 5987 + useDateHeader: false + adminConnectors: + - type: http + bindHost: 0.0.0.0 + port: 5989 + useDateHeader: false + gzip: + includedMethods: + - GET + - POST + requestLog: + appenders: + - type: console + target: stderr diff --git a/couchdb/10-docker-default.ini b/couchdb/10-docker-default.ini index 92e42a2863e..a15982eabb6 100644 --- a/couchdb/10-docker-default.ini +++ b/couchdb/10-docker-default.ini @@ -41,3 +41,7 @@ n=1 [attachments] compressible_types = text/*, application/javascript, application/json, application/xml compression_level = 8 + +[nouveau] +enable = true +url = http://nouveau:5987 diff --git a/couchdb/Dockerfile b/couchdb/Dockerfile index 2baa33c424a..1e4f0586f0d 100644 --- a/couchdb/Dockerfile +++ b/couchdb/Dockerfile @@ -1,4 +1,4 @@ -FROM couchdb:3.3.3 as base_couchdb_build +FROM couchdb:3.4.1 AS base_couchdb_build COPY --chown=couchdb:couchdb 10-docker-default.ini /opt/couchdb/etc/default.d/ COPY --chown=couchdb:couchdb vm.args /opt/couchdb/etc/ diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 1c55842a50e..289eeb0af22 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,5 +1,5 @@ # base build -FROM nginx:1.25.1-alpine as base_nginx +FROM nginx:1.25.1-alpine AS base_nginx RUN apk add --update --no-cache \ curl \ socat \ diff --git a/scripts/build/cht-couchdb-single-node.yml.template b/scripts/build/cht-couchdb-single-node.yml.template index 458b31f0e8c..921720ba968 100644 --- a/scripts/build/cht-couchdb-single-node.yml.template +++ b/scripts/build/cht-couchdb-single-node.yml.template @@ -20,6 +20,21 @@ services: networks: cht-net: + nouveau: + image: {{{ repo }}}/cht-couchdb-nouveau:{{ tag }} + volumes: + - ${COUCHDB_NOUVEAU_DATA:-./srv_nouveau}:/data/nouveau + restart: always + depends_on: + - couchdb + logging: + driver: "local" + options: + max-size: "${LOG_MAX_SIZE:-50m}" + max-file: "${LOG_MAX_FILES:-20}" + networks: + cht-net: + volumes: cht-credentials: diff --git a/scripts/build/versions.js b/scripts/build/versions.js index a1ed5be17eb..b67b8680edc 100644 --- a/scripts/build/versions.js +++ b/scripts/build/versions.js @@ -61,5 +61,5 @@ module.exports = { getRepo, escapeBranchName, SERVICES: ['api', 'sentinel'], - INFRASTRUCTURE: ['couchdb', 'haproxy', 'haproxy-healthcheck', 'nginx'], + INFRASTRUCTURE: ['couchdb', 'couchdb-nouveau', 'haproxy', 'haproxy-healthcheck', 'nginx'], };