Skip to content

Add SQLite as a first-class database backend #141

Closed

Description

@vitormattos

Part of #140 and LibreSign/libresign#8969.

Context

nextcloud-docker-development currently supports MySQL and PostgreSQL as explicit database services, while LibreSign's Behat compatibility matrix also includes SQLite.

The PHP development images currently install MySQL/PostgreSQL PDO extensions but do not install SQLite/PDO_SQLite.

The parent worker contract defines database selection as:

DB_TYPE=sqlite|mysql|mariadb|pgsql

This issue implements the sqlite branch of that contract.

Goal

Add SQLite as a first-class selectable database backend in nextcloud-docker-development.

Requirements

  • Install the PHP extensions required by Nextcloud for SQLite in every supported PHP development image used by the worker lifecycle.
  • DB_TYPE=sqlite must select SQLite without requiring a separate database container.
  • Install Nextcloud with --database=sqlite when SQLite is selected.
  • Keep the SQLite database inside the worker's isolated Nextcloud filesystem.
  • Do not use DB_HOST to encode SQLite selection; DB_TYPE owns backend selection.
  • Start no MySQL, MariaDB or PostgreSQL database service for a SQLite worker.
  • Preserve existing MySQL/PostgreSQL behavior.
  • Do not add LibreSign-specific behavior.

Compose/lifecycle behavior

The caller must be able to start a SQLite worker without editing Compose YAML or shell scripts.

The worker lifecycle must not wait for a network database when DB_TYPE=sqlite.

If the current Compose database service abstraction cannot represent “no service”, refactor the lifecycle/Compose layout explicitly rather than starting an unused database container.

Tests

Add automated coverage proving:

  • the PHP image exposes SQLite/PDO_SQLite;
  • a clean DB_TYPE=sqlite worker installs Nextcloud successfully;
  • occ status reports an installed instance;
  • data/configuration written in one SQLite worker is not visible in another checkout/worker;
  • selecting SQLite does not start or wait for MySQL/MariaDB/PostgreSQL;
  • existing MySQL/PostgreSQL setup tests continue to pass.

Documentation

Document a non-interactive example using DB_TYPE=sqlite and explain that no database service/container is required.

Done when

  • DB_TYPE=sqlite is supported.
  • Required PHP SQLite extensions are present in supported worker images.
  • Nextcloud autoinstall works with SQLite.
  • SQLite selection does not start or wait for a network database.
  • SQLite workers remain isolated per checkout/worker.
  • Existing MySQL/PostgreSQL behavior is not regressed.
  • Automated tests and documentation cover the new backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions