Repository navigation
Add SQLite as a first-class database backend #141
Description
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=sqlitemust select SQLite without requiring a separate database container.- Install Nextcloud with
--database=sqlitewhen SQLite is selected. - Keep the SQLite database inside the worker's isolated Nextcloud filesystem.
- Do not use
DB_HOSTto encode SQLite selection;DB_TYPEowns 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=sqliteworker installs Nextcloud successfully; occ statusreports 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=sqliteis 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.
Activity