Jump to content
  • 0

setting up Mediawiki on local system


paper

Question

I have stack.yml file as following:

# MediaWiki with MariaDB
#
# Access via "http://localhost:8080"
#   (or "http://$(docker-machine ip):8080" if using docker-machine)
version: '3'
services:
  mediawiki:
    image: mediawiki
    restart: always
    ports:
      - 8080:80
    links:
      - database
    volumes:
      - /Users/paperless/Technology/mediawiki
      # After initial setup, download LocalSettings.php to the same directory as
      # this yaml and uncomment the following line and use compose to restart
      # the mediawiki service
      - ./LocalSettings.php:/Users/paperless/Technology/mediawiki/
  database:
    image: mariadb
    restart: always
    ports:
      - 3306:3306
    environment:
      # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
      MYSQL_DATABASE: my_wiki
      MYSQL_USER: wikiuser
      MYSQL_PASSWORD: example
      MYSQL_RANDOM_ROOT_PASSWORD: 'yes'

 

Start command:
docker-compose -f stack.yml up

Then I try to access the url: localhost:8080 and it connects successfully. And finally download the LocalSettings.php file
I put the file in the same directory as stack.yml file and then uncomment the line:

  • ./LocalSettings.php:/Users/paperless/Technology/mediawiki/

Now when I try to start the server
I get following error:
ERROR: for mediawiki_mediawiki_1 Cannot start service mediawiki: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/Users/paperless/Technology/mediawiki/LocalSettings.php\\\" to rootfs \\\"/var/lib/docker/overlay2/373a9bf779dd1706c36c29d74abc1ff893d298433f9baec8b0e02bde4e3a7ab1/merged\\\" at \\\"/var/lib/docker/overlay2/373a9bf779dd1706c36c29d74abc1ff893d298433f9baec8b0e02bde4e3a7ab1/merged/Users/paperless/Technology/mediawiki/LocalSettings.php\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Then I changed

  • ./LocalSettings.php:/Users/paperless/Technology/mediawiki/ to
  • ./LocalSettings.php:/Users/paperless/Technology/mediawiki/LocalSettings.php

Now the container starts and am able to access UI at 8080. But it says not able to detect LocalSettings.php. So I restart all installation again. And same issue.

Also, in the ui, it says to place the LocalSettings.php in the same directory of index.php.

Where is the location of index.php on system?

We have to put LocalSettings.php in stack.yml dir? which I know.
or where index.php I am not able to find this file.

 

copied the file from here https://hub.docker.com/_/mediawiki/
and modified only the volume directory to actual dir
/Users/paperless/Technology/mediawiki

 

 

 

Edited by paper
stack.yml was not pasted properly (see edit history)
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.