PHPackages                             smichaelsen/typo3-gitlab-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. smichaelsen/typo3-gitlab-ci

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

smichaelsen/typo3-gitlab-ci
===========================

4.1.0(8y ago)323.1k3[2 issues](https://github.com/smichaelsen/typo3-gitlab-ci/issues)PHPPHP &gt;=7.0 &lt;7.2

Since Dec 23Pushed 7y ago3 watchersCompare

[ Source](https://github.com/smichaelsen/typo3-gitlab-ci)[ Packagist](https://packagist.org/packages/smichaelsen/typo3-gitlab-ci)[ RSS](/packages/smichaelsen-typo3-gitlab-ci/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (24)Used By (0)

Gitlab CI configuration for your TYPO3
======================================

[](#gitlab-ci-configuration-for-your-typo3)

[![Build Status](https://camo.githubusercontent.com/ba3897022ac83a8a5c717ca329c56d51159bce9b6188d103a8d81d879761319c/68747470733a2f2f7472617669732d63692e6f72672f736d69636861656c73656e2f7479706f332d6769746c61622d63692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/smichaelsen/typo3-gitlab-ci)

This package can help you to set up deployment of your TYPO3 installation with GitLab CI. Your TYPO3 installation has to be composer based.

[![Screenshot](doc/overview.png?raw=true "Screenshot")](doc/overview.png?raw=true)

Setup
=====

[](#setup)

Include the following configuration in your root composer.json:

```
"require": {
    "smichaelsen/typo3-gitlab-ci": "^4.0.0"
},
"extra": {
    "helhum/typo3-console": {
        "install-binary": false,
        "install-extension-dummy": false
    },
    "typo3/cms": {
        "cms-package-dir": "{$vendor-dir}/typo3/cms",
        "web-dir": "web"
    }
},
"scripts": {
    "install-gitlab-ci": [
        "{$vendor-dir}/smichaelsen/typo3-gitlab-ci/scripts/install.sh"
    ],
    "post-autoload-dump": [
        "@install-gitlab-ci"
    ]
}

```

Run `composer update` to install everything. You'll find a `.env.example` in your root directory. Copy it to `.env`, add it to `.gitignore` and populate it with the settings for your local TYPO3 installation.

If previously there was no `typo3conf/AdditionalConfiguration.php` there will be one after installing this package that will take care of loading the settings from `.env`. If you have a custom `typo3conf/AdditionalConfiguration.php` already, just include the following line at the beginning of the file:

```
(new \Smichaelsen\Typo3GitlabCi\ConfigLoader())->populate();

```

Experimental: Setup a fresh installation with [helhum/minimal-typo3-distribution](https://github.com/helhum/minimal-typo3-distribution)
=======================================================================================================================================

[](#experimental-setup-a-fresh-installation-with-helhumminimal-typo3-distribution)

```
composer create-project helhum/minimal-typo3-distribution my-typo3-project ^8
cd my-typo3-project
./vendor/bin/typo3cms install:setup

```

The last command is interactive and will ask for your DB credentials. Select "site" or "no" as setup type.

```
composer require smichaelsen/typo3-gitlab-ci dev-master && vendor/smichaelsen/typo3-gitlab-ci/scripts/install.sh
php -S 127.0.0.1:8080 -t web/

```

GitLab variables
================

[](#gitlab-variables)

Set the following variables in your GitLab project to get a working deployment.

Variable Nameprefixable with branch name ⭐DescriptionMandatory`SSH_PRIVATE_KEY`❌Private SSH key ✨✅`SSH_USERNAME`✅User name for SSH connection✅`SSH_HOST`✅Hostname (IP or domain) of target server.✅`SSH_PORT`✅Port for the ssh connection. Defaults to 22.❌`SSH_REMOTE_PATH`✅Path where on the target server the project should be deployed.✅`DBHOST`✅Database host✅`DBNAME`✅Database name✅`DBUSER`✅Database user✅`DBPASS`✅Database password✅`ENCRYPTION_KEY`✅Overwrites the `$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']`.❌`INSTALL_TOOL_PASSWORD`✅Overwrites the `$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']`.❌`IM_PATH`✅Overwrites the `$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']`.❌`PHP_BINARY`✅PHP binary that should be used to execute PHP cli scripts on the target server.❌⭐ Prefixing a variable name with a certain branch name will make the setting valid only for this branch. E.g. `master_DBPASS`will only be valid for the `master` branch and will then take precedence over `DBPASS` if that is configured.

✨ Generate an SSH key pair and store the private key in `SSH_PRIVATE_KEY`. Add the public key to `.ssh/authorized_keys` on your target server(s). Additionally add the public key as "Deploy Key" to private repositories that you need to load (e.g. via composer).

Custom Scripts and configuration
--------------------------------

[](#custom-scripts-and-configuration)

You can invoke your own scripts at certain points of the deployment process. After installing this package you will find a folder `gitlab-script/` in your root directory with files prefixed with an underscore `_`. Remove the underscore to activate the file and fill it with your own commands.

### `after-composer.sh`

[](#after-composersh)

Will be executed in the `composer` job which loads all dependencies and then moves everything to the `.Build` folder that is needed in the next stages and will eventually be deployed. You can use this custom script to influence the contents of `.Build`.

### `build-extensions.sh`

[](#build-extensionssh)

Will be executed in the `build_extensions` job. If your TYPO3 extensions need to be built before the deployment, you can do it here. This job is executed with the [node:8](https://hub.docker.com/_/node/) docker image, which means the machine is well prepared for node based frontend buildings (npm, grunt etc). But your script can also install other software you need.

### `pre-deploy.sh`

[](#pre-deploysh)

Will be executed in the `deploy` job, right before the code is actually transfered to the target server. Use this script to do last minute preparations on the target server.

Hint: In your own scripts you have all your Gitlab CI variables available. So you can perform commands on the target server like this:

```
ssh -p $SSH_PORT $SSH_USERNAME@$SSH_HOST "echo 'Hello from the target server!'"

```

### `rsync-build-excludes.txt`

[](#rsync-build-excludestxt)

List files and directories in here that you want to exclude from your whole CI process. This speeds up your CI process and lowers disk usage on the runner server. List one file / directory pattern per line.

### `rsync-deploy-excludes.txt`

[](#rsync-deploy-excludestxt)

List files and directories in here that you used in the CI process but don't want to deploy onto the target server. It's good practice and improves security to only ship to the production server what is really needed to run then website. List one file / directory pattern per line.

Versions and updating
---------------------

[](#versions-and-updating)

This package uses [semantic versioning](http://semver.org/). So you are encouraged to require the package with `^4.0.0`. Then you can expect receiving bugfix releases and improvements without breaking changes.

### Breaking Changes:

[](#breaking-changes)

#### 4.x to 5.x:

[](#4x-to-5x)

- last commit: TYPO3 is now required in version 8.7

#### 3.x to 4.x:

[](#3x-to-4x)

- [88a6e934](https://github.com/smichaelsen/typo3-gitlab-ci/commit/88a6e934d5256e0a76247734266abd42c5c3dabc): PHP is now required in version 7.0
- [1c8d9c70](https://github.com/smichaelsen/typo3-gitlab-ci/commit/1c8d9c70b73f15f014cc9d24552def230ecfb724): The web directory was renamed from `Web` to lowercase `web`. Be sure to set `"web-dir": "web"` in your `composer.json` (see above at "Setup"). Also be sure your web server host config points to the lower case directory. On case insensitive file systems (like macOS) you will have to rename your directory manually.
- [dbdf3ba2](https://github.com/smichaelsen/typo3-gitlab-ci/commit/dbdf3ba200d94034c4b8aa4c061a6754ac3ac639): The `build_extensions` job is now executed with a node 8 image instead of node 7. Make sure your frontend building works based on node 8.

#### 2.x to 3.x:

[](#2x-to-3x)

- [384242e0](https://github.com/smichaelsen/typo3-gitlab-ci/commit/384242e0d426a653b4e5e6d8ae6aa6d6cc2a0e64): The `.Build` folder is now built from all files excluding some certain files and directories (such as `.git`) instead of only copying a list of known files and directory. That can result in additional files landing in the `.Build` folder and being deploying eventually. Use the new `gitlab-ci-scripts/rsync-build-excludes.txt` to define additional excludes.
- [a6a12ee3](https://github.com/smichaelsen/typo3-gitlab-ci/commit/a6a12ee3278e6da42b83b023f439fa51ed8645f6): The fileadmin sync feature was removed as it was complex to setup and buggy. The pipeline runs faster now without the unnecessary stage.
- [ff869f95](https://github.com/smichaelsen/typo3-gitlab-ci/commit/ff869f9552ebdf281f32eaaa402ce9f3575846f9): The [TYPO3 console](https://github.com/TYPO3-Console/TYPO3-Console) now additonally executes `extension:setupactive` and `upgrade:all`. Please check if that is desired for your project.
- [055f641c](https://github.com/smichaelsen/typo3-gitlab-ci/commit/055f641c5d15226149dc8334a674a653ee66f7ea): `download` and `typo3conf/LFEditor` are not excluded from deployment anymore, because they are very project specific. If you rely on them not being rsynced, add them to `gitlab-ci-scripts/rsync-deploy-excludes.txt`
- [cf5cc8b0](https://github.com/smichaelsen/typo3-gitlab-ci/commit/cf5cc8b0a7c5c705f1fafe1a71f5f8af6475d0d1): The `build_extensions` job is now executed with a node 7 image instead of node 6. Make sure your frontend building works based on node 7.

#### 1.x to 2.x:

[](#1x-to-2x)

- Instead of providing *both* ssh user name *and* host in `SSH_HOST`, now there is a separate `SSH_USERNAME` variable. You have to set it to make sure your deployment works.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% 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.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~38 days

Total

15

Last Release

2996d ago

Major Versions

1.2.1 → 2.0.02017-03-14

2.0.0 → 3.0.02017-07-20

3.0.3 → 4.0.02017-09-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/886face3e57e668db2bf95d62325f423baf7e9d8949a9e4c84d3a0e6c3891920?d=identicon)[smichaelsen](/maintainers/smichaelsen)

---

Top Contributors

[![smichaelsen](https://avatars.githubusercontent.com/u/912435?v=4)](https://github.com/smichaelsen "smichaelsen (113 commits)")[![coding46](https://avatars.githubusercontent.com/u/1724196?v=4)](https://github.com/coding46 "coding46 (1 commits)")

---

Tags

continuous-integrationgitlab-citypo3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smichaelsen-typo3-gitlab-ci/health.svg)

```
[![Health](https://phpackages.com/badges/smichaelsen-typo3-gitlab-ci/health.svg)](https://phpackages.com/packages/smichaelsen-typo3-gitlab-ci)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

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

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

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