Page MenuHomePhabricator

Externalize extensions and themes folders for persistence in docker
Closed, InvalidPublicFeature

Description

Feature summary
I would like to assign docker host directories as bind type docker volumes to the container for extensions and themes.

Use case(s)
I would like to be able to update mediawiki docker containers without losing themes and extensions.

Benefits
Saves time during image updates.

Event Timeline

MI6 renamed this task from Externalize extensions folder for persistence in docker to Externalize extensions and themes folders for persistence in docker.Jun 5 2023, 7:40 AM
MI6 updated the task description. (Show Details)

Hey, thanks for creating this feature request 👋
I am not really sure what would need to change in order to implement this, as I am currently already happily using this like so:
docker-compose.yml:

version: '3.3'
services:
  mediawiki:
    image: mediawiki:1.41.0
    restart: always
    ports:
      - 127.0.0.1:3096:80
    volumes:
      # Data
      - ./images:/var/www/html/images
      - ./cache/:/usr/share/mediawiki/cache/
      # Extensions
      - ./extensions/Auth_remoteuser/:/var/www/html/extensions/Auth_remoteuser/
      - ./extensions/MobileFrontend/:/var/www/html/extensions/MobileFrontend/
      # Skins
      - ./skins/MinervaNeue/:/var/www/html/skins/MinervaNeue/

  database:
    image: mariadb:latest
    restart: always
    environment:
      MYSQL_DATABASE: mathphys_wiki_mediawiki
      MYSQL_USER: mathphys_wiki_mediawiki
      # MARIADB_AUTO_UPGRADE: "yes"

      # please set the following two vars in the env file
      # MYSQL_PASSWORD: ***
      # MYSQL_ROOT_PASSWORD: ***

    env_file:
      - db-secrets.env
    volumes:
      - db-data:/var/lib/mysql

volumes:
    db-data: {}

Oh wow now I feel really stupid. I simply didn't think of the possibility to create "sub-shares" like you propose LOL

Thanks for the heads up, this completely solves my problem!

Aklapper changed the task status from Resolved to Invalid.Jan 10 2024, 4:25 PM