dockerbitnamidokuwiki

Adding and overriding files in Dokuwiki Bitnami docker image


Am trying to enable 'translation' plugin dokuwiki and few other changes to Dokuwiki Bitnami image. For instance I add a new file to 'lib/tpl/dokuwiki' to Dokuwiki Bitnami image and also overriding a 'lang.php'.

Changes to default original docker-compose.yml

   - './conf/lang.php:/bitnami/dokuwiki/lib/tpl/dokuwiki/lang/en/lang.php'
      - './conf/sidebarheader.html:/bitnami/dokuwiki/lib/tpl/dokuwiki/sidebarheader.html' 

However the changes are not reflected in the container and no errors are generated.. Any suggestion are appreciated.


Solution

  • This is what it worked for us:

    1. Install plugin with extension manager. https://www.dokuwiki.org/plugin:translation

    2. Copy the local.php file to the host machine

    docker cp <container>:/bitnami/dokuwiki/conf/local.php conf/local.php
    
    1. Append the following to the local.php file. https://www.dokuwiki.org/plugin:translation#manual_configuration
    
    $conf['plugin']['translation']['translations']  = 'en,fr,de,it';                        // available languages
    $conf['plugin']['translation']['dropdown']      = 1;                                    // use a dropdown
    $conf['plugin']['translation']['translationns'] = 'wiki';                               // namespace where to activate translation
    $conf['plugin']['translation']['skiptrans']     = '^:(plugin|template):';               // what to skip (regexp)
    $conf['plugin']['translation']['translateui']   = 1;                                    // translate the wiki user interface too
    $conf['plugin']['translation']['checkage']      = 1;                                    // show notice on outdated translations
    $conf['plugin']['translation']['about']         = 'translation:about';                  // page describing the translation process to users
    $conf['plugin']['translation']['localabout']    = 1;
    $conf['plugin']['translation']['display']       = 'langcode,name';
    
    1. Create conf/sidebarheader.html in the host machine:
    <?php
    $translation = plugin_load('helper','translation');
    if ($translation) echo $translation->showTranslations();
    ?>
    
    1. Make sure the sidebar is created. Create it if not. http://<YOUR_SERVER>/doku.php?id=sidebar

    2. Mount files in the docker-compose

        volumes:
          - 'dokuwiki_data:/bitnami'
          - './conf/local.php:/bitnami/dokuwiki/conf/local.php'
          - './conf/sidebarheader.html:/bitnami/dokuwiki/lib/tpl/dokuwiki/sidebarheader.html'
    
    1. Recreate the container to apply the new mounted paths
    dc down && dc up
    

    enter image description here