PHPackages                             joomla-projects/virtualisation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. joomla-projects/virtualisation

AbandonedArchivedLibrary[DevOps &amp; Deployment](/categories/devops)

joomla-projects/virtualisation
==============================

An XML based generator for docker environments, mostly used for automated testing.

386[1 issues](https://github.com/joomla-projects/virtualisation/issues)[1 PRs](https://github.com/joomla-projects/virtualisation/pulls)PHP

Since May 18Pushed 4y ago7 watchersCompare

[ Source](https://github.com/joomla-projects/virtualisation)[ Packagist](https://packagist.org/packages/joomla-projects/virtualisation)[ RSS](/packages/joomla-projects-virtualisation/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Joomla! Virtualisation
======================

[](#joomla-virtualisation)

The Joomla! Virtualisation tool generates a `docker-compose.yml` file based on XML setup definitions used for - but not limited to - automated testing. It is based on [GreenCape/build](https://github.com/GreenCape/build).

*This repository also contains a set of* `Dockerfile`*s. Once they no longer undergo frequent changes, the images will be available on DockerHub.*

Installation
------------

[](#installation)

*Joomla! Virtualisation is work in progress. Once it has everything to really be usable, it will be available for installation through Composer.*

> Be sure to use recent versions of `docker` and `docker-compose`. The versions you get from the standard repository for Ubuntu 16.04, for example, are too outdated. Follow the official instructions for [Docker Community Edition (CE)](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/) to get the most recent versions.

Usage
-----

[](#usage)

```
use Joomla\Virtualisation\DockerComposeGenerator;

$generator = new DockerComposeGenerator('tests/servers');
$generator->write('dockyard/docker-compose.yml');
```

where '`tests/servers`' is the directory containing the XML setup configurations and '`dockyard`' is the docker build directory defined in the environment (see Environment / `host` / `dockyard` in the next section).

### Define Test Environments

[](#define-test-environments)

Create a new directory `servers` under your `tests` directory. It will house the following XML files to describe server configurations.

#### Databases

[](#databases)

The database credentials are expected to be in a file named `database.xml` in the `tests/servers` directory.

```

```

##### MySQL

[](#mysql)

Defines version and credentials for a MySQL (compatible) database server.

- `version` - The version of MySQL to use. Supported are all minor versions since MySQL 5.5. Defaults to 'latest'.
- `name` - The name of the database.
- `user` - The name of the database user.
- `password` - The database user’s password.
- `rootPassword` - The database root password.

##### PostgreSQL

[](#postgresql)

Defines version and credentials for a PostgreSQL database server.

- `version` - The version of PostgreSQL to use. Supported are all minor versions since PostgreSQL 9.2. Defaults to 'latest'.
- `name` - The name of the database.
- `user` - The name of the database user.
- `password` - The database user’s password.

#### Environment

[](#environment)

```

```

- `name` - The name for this environment. For the default environment, it is always `default`.

Common settings to all test servers are kept in an environment named `default` and stored in `default.xml`. An average environment definition will contain just the server, joomla, and database elements.

##### `host`

[](#host)

Defines settings of the docker host.

- `dockyard` - This setting determines the directory, where the the generated volumes (file systems) are located.
- `port` - The port, on which the proxy is expected to listen.

##### `joomla`

[](#joomla)

Defines the Joomla version and the sample data.

- `version` - This setting determines the Joomla version to be installed in this environment. It can be any Joomla version since 1.0.0. The version can be fully qualified, e.g., 3.4.2, but 3.4, 3, latest, master, staging, or any other branch name can also be used.
- `sampleData` - Which sample data to install, if any. The file `sample_.sql` must exist for the selected Joomla version and database driver.

##### `database`

[](#database)

The hostname of the database server is determined by the selected driver. The corresponding container is automatically linked to the Joomla installation.

- `driver` - This determines the type of the database being used by this Joomla installation. Currently, mysql, mysqli, pdomysql, and postgresql are supported.
- `name` - The name of the database containing the Joomla site’s data tables.
- `prefix` - The prefix applied to the name of the database tables used by this Joomla installation. For Joomla v1.5.x and v1.6.x this is “jos” by default, and should another Joomla site have to share the same database, the database tables would be kept separate by setting up this second site with a different prefix – e.g. “jos2”. With Joomla v1.7.x the same result is achieved by using a prefix that is a randomly generated alphabetic code and underscore – e.g. “vduea\_”.

##### `server`

[](#server)

Define the server settings.

- `type` - The engine to use. Valid values are nginx and apache.
- `offset` - The time zone.
- `tld` - The top level domain for the URL.

##### `php`

[](#php)

Define the PHP version.

- `version` - The PHP version to use. Supported are all minor versions since PHP 5.4. Defaults to 'latest'.

##### `cache`

[](#cache)

Defines the Joomla! cache settings. These values are written to the `configuration.php` file.

- `enabled` - This setting controls whether or not site caching is enabled. When enabled, web pages are held for a period of time in cache storage and are retrieved from there rather than being re-created each time required.
- `handler` - This setting defines the mechanism used to manage the cache storage.
- `time` - This parameter defines the maximum time for which web pages are held in the cache storage before being updated with the current version. The default is 15 minutes.

##### `debug`

[](#debug)

Defines the Joomla! debug settings. These values are written to the `configuration.php` file.

- `system` - If set to “1”, Joomla will add debug information on every page, below the normal web page area. This information will include various forms of diagnostic information, including the full database queries used in generating the page. The default setting is “No”. The mix and format of diagnostic information presented by the debug function may be altered by editing the parameters of the Debug - System plug-in (Extensions &gt; Plug-in Manager).
- `language` - If set to “1”, Joomla will activate features designed to help debug language translations for a Joomla site. This includes the addition of language translation information to page debug information (requires system also set to “1”), and markers to show translated content within the web pages themselves. For further information, refer to Debugging a translation.

##### `meta`

[](#meta)

Defines the Joomla! meta settings. These values are written to the `configuration.php` file.

- `description` - Text added here appears in web page headers as the “description” metadata entry.
- `keywords` - Words and phrases (separated by commas) added here appear in web page headers as the “keywords” metadata entry.
- `showVersion` - Whether or not to expose the Joomla version in the metadata.
- `showTitle` - (Only present in Joomla v1.6.x and later.) Appends the site name to page titles in the `title` tag of each web page header. Joomla v1.6.x introduced this feature as an option to either include the site name text before the page title (e.g. Site Name – Page Name) or omit it. With Joomla v1.7.x the options also include inserting the site name after the page name (e.g. Page Name – Site Name) as well as before.
- `showAuthor` - When this parameter is set to “1” an “author” metadata entry is added to the page header when appropriate, using the content item’s author name as the metadata text.

##### `sef`

[](#sef)

Defines the Joomla! SEF settings. These values are written to the `configuration.php` file.

- `enabled` - Joomla’s internal representation of URLs tends to be lengthy and also difficult to interpret by humans and search engine spiders. This is a typical example of the internal URL for a page displaying a content item: [www.example.com/index.php?option=com\_content&amp;view=article&amp;id=22&amp;Itemid=437](http://www.example.com/index.php?option=com_content&view=article&id=22&Itemid=437). If this option is set to “1”, the URL is modified into a shorter and more meaningful form: [www.example.com/index.php/getting-started](http://www.example.com/index.php/getting-started). The identifying text in the URL (in this case “getting\_started”) is derived from the Alias text set up for each Category, content item, and Menu item.
- `rewrite` - When this parameter is set to “1”, Joomla will use the mod\_rewrite function of Apache web servers to eliminate the `index.php` part of the URL. Thus when this is operating the “search engine friendly” URL shown above will become: [www.example.com/getting-started](http://www.example.com/getting-started).

    *Note: This parameter is set to “0” by default. It should not be set to “1” unless the web server uses Apache software. The `htaccess.txt` file is automatically renamed to `.htaccess`.*
- `suffix` - When set to “1”, Joomla will add .html to the end of the most site URLs thus simulating static file-based web content. The URLs shown above will then become: [www.example.com/index.php/getting-started.html](http://www.example.com/index.php/getting-started.html) or [www.example.com/getting-started.html](http://www.example.com/getting-started.html).
- `unicode` - (Only present in Joomla v1.6.x and later.) When saving edited content, the former setting attempts to convert, where appropriate, any alias text into the corresponding Latin characters. When set to “1”, Joomla leaves any non-Latin characters in the alias text unchanged. Changing this parameter does not retroactively change aliases, it just changes the behaviour of automatic alias generation for future content editing and creation.

##### `feeds`

[](#feeds)

Defines the Joomla! feeds settings. These values are written to the `configuration.php` file.

- `limit` - The number of content items to be shown in any RSS newsfeeds set up on the web site. By default, this is set to 10, although unless the site is very active a smaller number may be better.
- `email` - Atom and RSS newsfeeds generated from site content by the Joomla “Syndicate feeds” (“Syndication” in Joomla v1.5.x) site module may include an e-mail address as part of the author’s identity. This parameter determines the source of that email address: the “author” setting will use the email address held on the site for content author, “site” will use the “From email” address set up under the Server tab for emails generated automatically by the web site.

##### `session`

[](#session)

Defines the Joomla! session settings. These values are written to the `configuration.php` file.

- `lifetime` - This parameter determines how long a before user is automatically logged off for being inactive. The default setting is 15 minutes, although it can be useful to temporarily lengthen this parameter on development sites to avoid having to repeatedly log back in.
- `handler` - Selects the mechanism used to hold session information between one page request and the next one from the same user. The options are “database” (the default) and “none”. The former stores session information as entries in a table in the site’s Joomla database, the latter uses the session handling mechanism built in to PHP.

#### Examples

[](#examples)

Latest Joomla!2.5 on Apache with MySQLi and sample data

```

```

Latest Joomla!3 on Nginx with PostgreSQL, no sample data

```

```

Contribute
----------

[](#contribute)

PRs are welcome. If you encounter any bug or issues, please use the [issue tracker](https://github.com/joomla-projects/virtualisation/issues).

To contribute code or bugfixes, clone this repository, add your changes and make a pull request against the `develop` branch.

### Running Tests

[](#running-tests)

On the command line, enter

```
$ phpunit

```

within the project's root directory.

The main test creates a complete setup in the `dockyard` directory, which can be used to explore the possibilities. To invoke it, run

```
$ phpunit tests/DockerComposeGeneratorTest

```

This step is already included in the convenience command `composer build` as described below.

#### Container Tests

[](#container-tests)

For the Apache and PHP-FPM containers, this project provides own images (see `src/Service/docker`). To ensure that those images have the required traits, a separate suite of tests was created in `tests-container`. They were separated from the other tests, because they need 1-2 minutes for each container and PHP version to run.

The tests ensure that for each supported PHP version

- Containers build successfully and
- both FPM resp. Apache handler and CLI
    - have the requested PHP version
    - have a suitable Xdebug version enabled
    - use catchmail instead of sendmail
    - support OpenSSL
    - support MysqlI and PDO Driver for MySQL
    - support PostgreSQL and PDO Driver for PostgreSQL

To run these tests, enter

```
$ phpunit tests-container

```

on the command line.

### Convenience Commands

[](#convenience-commands)

Some `composer` scripts are provided to make life a bit easier. They are run from the project's root directory, and frees you from having to change into the `dockyard` directory as required by `docker-compose`.

#### Run the Tests in Clean Environment

[](#run-the-tests-in-clean-environment)

```
$ composer test

```

PHPUnit is run with the `--testdox` option after removing `dockyard` content.

#### Setup the Virtual Network

[](#setup-the-virtual-network)

```
$ composer build

```

Runs the main test and builds all docker images. This network is created: [![Docker Network](assets/setup.svg)](assets/setup.svg)

#### Start the Virtual Network

[](#start-the-virtual-network)

```
$composer start

```

Starts the containers in the background after running the tests.

#### Stop the Virtual Network

[](#stop-the-virtual-network)

```
$ composer stop

```

Stops all running containers.

#### Tear Down the Virtual Network

[](#tear-down-the-virtual-network)

```
$ composer clean

```

Removes the containers and the `dockyard` content. If necessary, the containers are stopped automatically.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/84f7f05685e84e3fe971d8d005bb74e766204799c50a7b45036af27436cecddc?d=identicon)[GreenCape](/maintainers/GreenCape)

![](https://www.gravatar.com/avatar/10b2f49e604583bbe4a444a3893954ec31d3dfa9a78d84550524964f1ab1b262?d=identicon)[jatitoam](/maintainers/jatitoam)

![](https://avatars.githubusercontent.com/u/3048593?v=4)[Puneet](/maintainers/puneet0191)[@puneet0191](https://github.com/puneet0191)

![](https://avatars.githubusercontent.com/u/897638?v=4)[Yves Hoppe](/maintainers/yvesh)[@yvesh](https://github.com/yvesh)

---

Top Contributors

[![nibra](https://avatars.githubusercontent.com/u/827605?v=4)](https://github.com/nibra "nibra (71 commits)")[![isacandrei](https://avatars.githubusercontent.com/u/12884469?v=4)](https://github.com/isacandrei "isacandrei (21 commits)")[![jatitoam](https://avatars.githubusercontent.com/u/1500978?v=4)](https://github.com/jatitoam "jatitoam (1 commits)")

### Embed Badge

![Health badge](/badges/joomla-projects-virtualisation/health.svg)

```
[![Health](https://phpackages.com/badges/joomla-projects-virtualisation/health.svg)](https://phpackages.com/packages/joomla-projects-virtualisation)
```

###  Alternatives

[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

193739.0k3](/packages/ryoluo-sail-ssl)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4676.9k](/packages/tiamo-phpas2)[wapmorgan/php-rpm-packager

RPM packager for PHP applications.

116.5k](/packages/wapmorgan-php-rpm-packager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
