From 460f64dd0cee767511977b7e3b10b8791447e9f3 Mon Sep 17 00:00:00 2001
From: Paul <paul@zom.bi>
Date: Sun, 22 May 2022 15:21:00 +0200
Subject: [PATCH 1/2] FIX: Downgrade composer back to working version

---
 Dockerfile          | 2 +-
 scripts/db-setup.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 30e76fd..f4b039f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -77,7 +77,7 @@ RUN set -eu; \
     && curl https://extdist.wmflabs.org/dist/extensions/Auth_remoteuser-REL1_37-2852bad.tar.gz |tar -xz
 
 # Install composer packages
-COPY --from=composer:2.3 /usr/bin/composer /usr/bin/composer
+COPY --from=library/composer:2.1 /usr/bin/composer /usr/bin/composer
 RUN set -eu; \
     ln -s /var/www/conf/LocalSettings.local.php /var/www/html/LocalSettings.local.php; \
     ln -s /var/www/conf/LocalSettings.php /var/www/html/LocalSettings.php
diff --git a/scripts/db-setup.sh b/scripts/db-setup.sh
index fa867dc..be59cc8 100644
--- a/scripts/db-setup.sh
+++ b/scripts/db-setup.sh
@@ -37,7 +37,7 @@ echo
 
 # Copy the htaccess file
 mkdir -p /var/www/localstore/images
-mkdir -p /var/www/localstore/smwconfig 
+mkdir -p /var/www/localstore/smwconfig
 cp /var/www/html/images/* /var/www/localstore/images
 chown -R www-data:www-data /var/www/localstore
 

From e98462b4aa0d7d80fd9191328e90b0429610b1bb Mon Sep 17 00:00:00 2001
From: Paul <paul@zom.bi>
Date: Sun, 22 May 2022 15:22:00 +0200
Subject: [PATCH 2/2] FEAT: Provide example configuration for testing

---
 Makefile            |  2 +-
 docker-compose.yaml | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 docker-compose.yaml

diff --git a/Makefile b/Makefile
index 3e62160..29a1cc1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 build:
-	docker build -t tmp .
+	docker build -t zombi/mediawiki:1.37.2 .
 
 run:
 	docker-compose up
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 0000000..48a848e
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,34 @@
+version: "3.8"
+
+volumes:
+  database:
+  wikistore:
+
+networks:
+  internal:
+
+services:
+  mediawiki:
+    image: zombi/mediawiki:1.37.2
+    environment:
+      WG_DB_TYPE: postgres
+      WG_DB_SERVER: db
+      WG_DB_PORT: 5432
+      WG_DB_NAME: mediawiki
+      WG_DB_USER: mediawiki
+      WG_DB_PASSWORD: mediawiki
+      WG_SERVER: "http://localhost:8080"
+      SEMANTIC_URL: "wiki.example.com"
+      MEDIAWIKI_ADMIN_PASS: "poGh3ohphu2oNgeishiu"
+    volumes:
+    - wikistore:/var/www/localstores
+    ports:
+    - 8080:80
+  db:
+    image: library/postgres:14
+    environment:
+      POSTGRES_DB: mediawiki
+      POSTGRES_USER: mediawiki
+      POSTGRES_PASSWORD: mediawiki
+    volumes:
+    - database:/var/lib/postgresql/data
\ No newline at end of file