PHPackages                             liquidlight/deployer-typo3-ci - 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. liquidlight/deployer-typo3-ci

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

liquidlight/deployer-typo3-ci
=============================

TYPO3 deployment via CI

3.1.1(6mo ago)015.4k↓32.5%[1 issues](https://github.com/liquidlight/deployer-typo3-ci/issues)GPL-2.0+PHP

Since Aug 11Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/liquidlight/deployer-typo3-ci)[ Packagist](https://packagist.org/packages/liquidlight/deployer-typo3-ci)[ Docs](https://github.com/liquidlight/deployer-typo3-ci)[ RSS](/packages/liquidlight-deployer-typo3-ci/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (21)Used By (0)

Liquid Light Deployer
=====================

[](#liquid-light-deployer)

This package is used by Liquid Light to deploy TYPO3 websites via CI - specifically Gitlab.

---

It is best used within Gitlab CI as it can utilise several environment variables.

The basis for this is [PHP Deployer](https://deployer.org/), however a lot of functionality comes from [deployer-extended-typo3](https://github.com/sourcebroker/deployer-extended-typo3) and it's many meta-packages.

Options
-------

[](#options)

There are several settings [defined by default](./deployer/hosts) within this package for the most common hosts.

### Hosts

[](#hosts)

Set the hostname of the server in the `deploy.php` file - the rest of the connection details should be in your `.ssh/config` file

```
host('production')
  ->set('hostname', 'client.xxx')
;
```

#### Existing Hosts

[](#existing-hosts)

The following hosts have a config file in the `deployer/hosts` file with some sensible defaults

- production
- staging
- local

### Clearing OPCache

[](#clearing-opcache)

If the server has `OPCache` installed, it will need to be cleared on each deployment to allow PHP and Apache to see the new symlinks.

To do this, you need to declare an array in `public_urls` in the deploy file, along with adding the `cache:clear_php_http` task for the environment.

1. Add `->set('public_urls', ['[URL]'])` to the `production` host in `deploy.php`
2. Add the `cache:clear_php_http` task for production instances (example below)

```
on(select('instance=production'), function ($host) {
	after('cache:clear_php_cli', 'cache:clear_php_http');
});
```

### Pushing the database

[](#pushing-the-database)

Pushing the database to live is prohibited, however there are some cases where this needs to be done.

To allow this, add the following to your local `deploy.php` file

```
set('db_allow_push_live', true);
```

Common settings
---------------

[](#common-settings)

### VPS

[](#vps)

#### Configuration

[](#configuration)

Add the following settings if not set (and adjust if necessary). They can be set globally or chained to the host (e.g. `->set('writable_use_sudo', true)`)

```
set('writable_use_sudo', true);
set('cleanup_use_sudo', true);
set('writable_mode', 'chgrp');
set('http_group', 'www-data');
```

#### Additional tasks

[](#additional-tasks)

**`deploy:vps:writable`**

Add an extra post-deploy task to reset permissions and reboot PHP if needed

```
after('typo3:cache:flush:pages', 'deploy:vps:writable');
```

**`service:php_fpm_reload`**

Add PHP reloading to set the correct version as documented in [deployer-extended](https://github.com/sourcebroker/deployer-extended?tab=readme-ov-file#service)

Upgrading
---------

[](#upgrading)

### v2 -&gt; v3

[](#v2---v3)

As well as removing some functionality, the v3 upgrade requires some changes to the `deploy.php` file

1. In `deploy.php`, update the require location &amp; class invocation

```
