From 272324f7d1f8434c315f4a616a0252d0551d5966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Tue, 28 Mar 2023 13:08:51 +0200 Subject: [PATCH] add mediawiki, migrate containers migrated containers: mariadb, nginx-proxy-manager, photoprism --- .env | 11 ++++++- docker-compose.yml | 74 ++++++++++++++++++++++++++++++++++++++++++++++ mediawiki.env | 3 ++ photoprism.env | 11 +++++++ 4 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 mediawiki.env create mode 100644 photoprism.env diff --git a/.env b/.env index f17999b..7e03386 100644 --- a/.env +++ b/.env @@ -3,6 +3,7 @@ DOMAIN=kucharczyk.xyz TZ=Europe/Prague STORAGE_PATH=/srv/mergerfs/storage DOCKER_STORAGE_PATH=/docker +PHOTOS_STORAGE_PATH=/srv/dev-disk-by-uuid-2d34f1a9-4284-4cad-ae9a-f1ef36244201/photos EMAIL_FROM=kucharczyk.lukas@gmail.com EMAIL_HOST=smtp.gmail.com EMAIL_PASSWORD=sebrubdsgkuptcjr @@ -11,6 +12,9 @@ POSTGRES_HOST=postgres POSTGRES_USERNAME=lukas POSTGRES_PASSWORD=kralovna POSTGRES_PORT=5432 +MYSQL_USER=lukas +MYSQL_PASSWORD=kralovna +MYSQL_ROOT_PASSWORD=kralovna PUID=1000 PGID=100 KAVITA_INTERNAL_PORT=5000 @@ -72,4 +76,9 @@ SYNCTHING_INTERNAL_PORT3=22000/udp SYNCTHING_EXTERNAL_PORT4=21027 SYNCTHING_INTERNAL_PORT4=21027/udp SEARXNG_EXTERNAL_PORT=8082 -SEARXNG_INTERNAL_PORT=8080 \ No newline at end of file +SEARXNG_INTERNAL_PORT=8080 +MEDIAWIKI_EXTERNAL_PORT=8083 +MEDIAWIKI_INTERNAL_PORT=8080 +MARIADB_PORT=3306 +PHOTOPRISM_EXTERNAL_PORT=2342 +PHOTOPRISM_INTERNAL_PORT=2342 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5a82d42..a71467c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -634,12 +634,84 @@ services: - CHOWN - SETGID - SETUID + profiles: + - base + restart: unless-stopped logging: driver: "json-file" options: max-size: "1m" max-file: "1" + mediawiki: + container_name: mediawiki + image: mediawiki + networks: + - public + depends_on: + - mariadb + ports: + - "${MEDIAWIKI_EXTERNAL_PORT}:${MEDIAWIKI_INTERNAL_PORT}" + volumes: + - "${DOCKER_STORAGE_PATH}/mediawiki/images:/var/www/html/images" + - "${DOCKER_STORAGE_PATH}/mediawiki/LocalSettings.php:/var/www/html/LocalSettings.php" + profiles: + - base + restart: unless-stopped + + npm: + container_name: nginx-proxy-manager + image: docker.io/jc21/nginx-proxy-manager:2.9.22 + network_mode: host + # doesn't need to be in the mariadb network because it uses host mode + depends_on: + - mariadb + volumes: + - "${DOCKER_STORAGE_PATH}/nginx-proxy-manager/data:/data" + - "${DOCKER_STORAGE_PATH}/nginx-proxy-manager/letsencrypt:/etc/letsencrypt" + environment: + - DB_MYSQL_HOST=localhost + - DB_MYSQL_NAME=npm + - DB_MYSQL_PASSWORD=npm + - "DB_MYSQL_PORT=${MARIADB_PORT}" + - DB_MYSQL_USER=npm + profiles: + - infra + restart: unless-stopped + + photoprism1: + container_name: photoprism + image: docker.io/photoprism/photoprism + networks: + - mariadb + - public + ports: + - "${PHOTOPRISM_EXTERNAL_PORT}:${PHOTOPRISM_INTERNAL_PORT}" + depends_on: + - mariadb + env_file: + - photoprism.env + volumes: + - "${PHOTOS_STORAGE_PATH}/import:/photoprism/import" + - "${PHOTOS_STORAGE_PATH}/originals:/photoprism/originals" + - "${PHOTOS_STORAGE_PATH}/storage:/photoprism/storage" + profiles: + - base + restart: unless-stopped + + mariadb: + container_name: mariadb + image: linuxserver/mariadb + networks: + - mysql + - public + volumes: + - "${DOCKER_STORAGE_PATH}/mariadb:/config" + restart: unless-stopped + profiles: + - infra + + networks: loki: caddy: @@ -655,6 +727,8 @@ networks: attachable: true postgres: external: true + mariadb: + attachable: true volumes: timetracker-static: diff --git a/mediawiki.env b/mediawiki.env new file mode 100644 index 0000000..972c746 --- /dev/null +++ b/mediawiki.env @@ -0,0 +1,3 @@ +MYSQL_DATABASE=mediawiki +MYSQL_USER=mediawiki +MYSQL_PASSWORD=41eebea0e3ef17dc68064e004e03dafeddd996bf513021b5cf7daf5a0c4d2b32 \ No newline at end of file diff --git a/photoprism.env b/photoprism.env new file mode 100644 index 0000000..6e93de9 --- /dev/null +++ b/photoprism.env @@ -0,0 +1,11 @@ +PHOTOPRISM_ADMIN_PASSWORD=kRalovna12514265! +PHOTOPRISM_DATABASE_DRIVER=mysql +PHOTOPRISM_DATABASE_NAME=photoprism +PHOTOPRISM_DATABASE_PASSWORD=TWB64mcPZ^TSdo +PHOTOPRISM_DATABASE_SERVER=mariadb +PHOTOPRISM_DATABASE_USER=photoprism +PHOTOPRISM_IMPORT_PATH=/photoprism/import +PHOTOPRISM_ORIGINALS_PATH=/photoprism/originals +PHOTOPRISM_SITE_URL=https://photos.${DOMAIN} +PHOTOPRISM_SPONSOR=true +PHOTOPRISM_STORAGE_PATH=/photoprism/storage \ No newline at end of file