]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docker: Bump tested database versions
authorStephen Finucane <stephen@that.guru>
Fri, 25 Mar 2022 09:30:08 +0000 (09:30 +0000)
committerStephen Finucane <stephen@that.guru>
Fri, 25 Mar 2022 09:48:48 +0000 (09:48 +0000)
We were attempting to test with PostgreSQL 9.6, but Django 4.0 requires
PostgreSQL 10.0 or greater [1]. This was causing failures like those
seens at [2]. Configure jobs to use 'latest' like we do in CI to avoid
this issue.

While we're here, we also switch from MariaDB to MySQL and use the
'latest' tag of this. Once again, this was what we were actually using
in CI and doing this limits future work.

[1] https://docs.djangoproject.com/en/4.0/ref/databases/#postgresql-notes
[2] https://stackoverflow.com/q/69477858

Signed-off-by: Stephen Finucane <stephen@that.guru>
docker-compose-pg.yml
docker-compose.yml
tools/docker/Dockerfile

index 9129f323531898a2714fb9ba552176c70a099d38..645f93e16d03a340500210dc9c1de2f68fa28457 100644 (file)
@@ -1,14 +1,13 @@
 version: "3"
 services:
   db:
-    image: postgres:9.6
+    image: postgres:latest
     volumes:
       - ./tools/docker/db/postdata:/var/lib/postgresql/data
     environment:
       - POSTGRES_DB=patchwork
       - POSTGRES_USER=patchwork
       - POSTGRES_PASSWORD=password
-
   web:
     build:
       context: .
index d8244364768da43e5e0e32deb646a18f6360436c..9bff93f657adc046fc1839ee5468617804e97d80 100644 (file)
@@ -1,7 +1,7 @@
 version: "3"
 services:
   db:
-    image: mariadb:10.4
+    image: mysql:latest
     volumes:
       - ./tools/docker/db/data:/var/lib/mysql
     environment:
@@ -9,7 +9,10 @@ services:
       - MYSQL_DATABASE=patchwork
       - MYSQL_USER=patchwork
       - MYSQL_PASSWORD=password
-
+    cap_add:
+      # avoid "mbind: Operation not permitted" error message spamming
+      # https://stackoverflow.com/a/55706057
+      - SYS_NICE  # CAP_SYS_NICE
   web:
     build:
       context: .
index 79902d7415862000d0f46ed97c66767268648959..d164e49192fc1f48dd11a96a72c3ea5e2f61399b 100644 (file)
@@ -21,10 +21,10 @@ RUN rm -f /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime
 
 RUN apt-get update && apt-get install -y --no-install-recommends \
     build-essential \
-    libmariadbclient-dev \
+    libmysqlclient-dev \
     libpq-dev \
     libsqlite3-dev \
-    mariadb-client \
+    mysql-client \
     postgresql-client \
     sqlite3 \
     tzdata \