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>
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: .
version: "3"
services:
db:
- image: mariadb:10.4
+ image: mysql:latest
volumes:
- ./tools/docker/db/data:/var/lib/mysql
environment:
- 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: .
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 \