Skip to content

SemanticMediaWiki .smw.json file not persisted across container restarts #66

@tosfos

Description

@tosfos

In Canasta deployments, the SemanticMediaWiki update key file (.smw.json) is not being persisted across container restarts or recreations, causing ERROR_SCHEMA_INVALID_KEY errors. While Canasta (by default) automatically runs update.php --quick on startup, this does not regenerate the missing .smw.json file, requiring manual intervention to restore it.

Root Cause

The .smw.json file is stored in /var/www/mediawiki/w/canasta-extensions/SemanticMediaWiki/.smw.json, but the canasta-extensions directory is not mounted as a persistent volume in the Docker Compose configuration.

This will affect Kubernetes deployments as well.

Expected Behavior

The .smw.json file should persist across container restarts without manual intervention.

Actual Behavior

The .smw.json file is lost after container recreation because:

  • The canasta-extensions directory is not a mountpoint
  • The directory exists only in the container filesystem layer
  • No volume mapping exists for this directory in docker-compose.yml

Workaround

Users can configure SemanticMediaWiki to use a persistent location by adding to LocalSettings.php:

$smwgConfigFileDir = '/mediawiki/config/smw';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions