Skip to content

Commit

Permalink
build image for nouveau
Browse files Browse the repository at this point in the history
  • Loading branch information
m5r committed Oct 14, 2024
1 parent 40c0d24 commit 8058731
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 3 deletions.
19 changes: 19 additions & 0 deletions couchdb-nouveau/Dockerfile
Original file line number Diff line number Diff line change
@@ -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<[email protected]>"
27 changes: 27 additions & 0 deletions couchdb-nouveau/nouveau.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions couchdb/10-docker-default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion couchdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
15 changes: 15 additions & 0 deletions scripts/build/cht-couchdb-single-node.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
};

0 comments on commit 8058731

Please sign in to comment.