{"id":21486626,"url":"https://github.com/smichaelsen/typo3-gitlab-ci","last_synced_at":"2025-07-15T14:33:04.504Z","repository":{"id":57053865,"uuid":"73958281","full_name":"smichaelsen/typo3-gitlab-ci","owner":"smichaelsen","description":"Gitlab CI configuration for your TYPO3 project.","archived":false,"fork":false,"pushed_at":"2018-09-19T17:57:35.000Z","size":169,"stargazers_count":31,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-24T03:14:55.999Z","etag":null,"topics":["continuous-integration","gitlab-ci","typo3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smichaelsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-16T20:28:47.000Z","updated_at":"2023-12-12T16:28:09.000Z","dependencies_parsed_at":"2022-08-24T04:11:49.086Z","dependency_job_id":null,"html_url":"https://github.com/smichaelsen/typo3-gitlab-ci","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smichaelsen%2Ftypo3-gitlab-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smichaelsen%2Ftypo3-gitlab-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smichaelsen%2Ftypo3-gitlab-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smichaelsen%2Ftypo3-gitlab-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smichaelsen","download_url":"https://codeload.github.com/smichaelsen/typo3-gitlab-ci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226046671,"owners_count":17565212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-integration","gitlab-ci","typo3"],"created_at":"2024-11-23T13:22:45.647Z","updated_at":"2024-11-23T13:22:46.283Z","avatar_url":"https://github.com/smichaelsen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitlab CI configuration for your TYPO3\n \n [![Build Status](https://travis-ci.org/smichaelsen/typo3-gitlab-ci.svg?branch=master)](https://travis-ci.org/smichaelsen/typo3-gitlab-ci)\n\nThis package can help you to set up deployment of your TYPO3 installation with GitLab CI. Your TYPO3 installation has to be composer based.\n\n![Screenshot](doc/overview.png?raw=true \"Screenshot\")\n\n# Setup\n\nInclude the following configuration in your root composer.json:\n\n    \"require\": {\n        \"smichaelsen/typo3-gitlab-ci\": \"^4.0.0\"\n    },\n    \"extra\": {\n        \"helhum/typo3-console\": {\n            \"install-binary\": false,\n            \"install-extension-dummy\": false\n        },\n        \"typo3/cms\": {\n            \"cms-package-dir\": \"{$vendor-dir}/typo3/cms\",\n            \"web-dir\": \"web\"\n        }\n    },\n    \"scripts\": {\n        \"install-gitlab-ci\": [\n            \"{$vendor-dir}/smichaelsen/typo3-gitlab-ci/scripts/install.sh\"\n        ],\n        \"post-autoload-dump\": [\n            \"@install-gitlab-ci\"\n        ]\n    }\n    \nRun `composer update` to install everything.\nYou'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.\n\nIf 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`.\nIf you have a custom `typo3conf/AdditionalConfiguration.php` already, just include the following line at the beginning of the file:\n\n````\n(new \\Smichaelsen\\Typo3GitlabCi\\ConfigLoader())-\u003epopulate();\n````\n\n# Experimental: Setup a fresh installation with [helhum/minimal-typo3-distribution](https://github.com/helhum/minimal-typo3-distribution)\n\n````\ncomposer create-project helhum/minimal-typo3-distribution my-typo3-project ^8\ncd my-typo3-project\n./vendor/bin/typo3cms install:setup\n````\nThe last command is interactive and will ask for your DB credentials. Select \"site\" or \"no\" as setup type.\n\n````\ncomposer require smichaelsen/typo3-gitlab-ci dev-master \u0026\u0026 vendor/smichaelsen/typo3-gitlab-ci/scripts/install.sh\nphp -S 127.0.0.1:8080 -t web/\n````\n\n# GitLab variables\n\nSet the following variables in your GitLab project to get a working deployment.\n\n| Variable Name           | prefixable with branch name :star: | Description                                                                     | Mandatory          |\n|-------------------------|------------------------------------|---------------------------------------------------------------------------------|--------------------|\n| `SSH_PRIVATE_KEY`       | :x:                                | Private SSH key :sparkles:                                                      | :white_check_mark: |\n| `SSH_USERNAME`          | :white_check_mark:                 | User name for SSH connection                                                    | :white_check_mark: |\n| `SSH_HOST`              | :white_check_mark:                 | Hostname (IP or domain) of target server.                                       | :white_check_mark: |\n| `SSH_PORT`              | :white_check_mark:                 | Port for the ssh connection. Defaults to 22.                                    | :x:                |\n| `SSH_REMOTE_PATH`       | :white_check_mark:                 | Path where on the target server the project should be deployed.                 | :white_check_mark: |\n| `DBHOST`                | :white_check_mark:                 | Database host                                                                   | :white_check_mark: |\n| `DBNAME`                | :white_check_mark:                 | Database name                                                                   | :white_check_mark: |\n| `DBUSER`                | :white_check_mark:                 | Database user                                                                   | :white_check_mark: |\n| `DBPASS`                | :white_check_mark:                 | Database password                                                               | :white_check_mark: |\n| `ENCRYPTION_KEY`        | :white_check_mark:                 | Overwrites the `$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']`.           | :x:                |\n| `INSTALL_TOOL_PASSWORD` | :white_check_mark:                 | Overwrites the `$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']`.      | :x:                |\n| `IM_PATH`               | :white_check_mark:                 | Overwrites the `$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']`.                 | :x:                |\n| `PHP_BINARY`            | :white_check_mark:                 | PHP binary that should be used to execute PHP cli scripts on the target server. | :x:                |\n\n:star: Prefixing a variable name with a certain branch name will make the setting valid only for this branch. E.g. `master_DBPASS`\nwill only be valid for the `master` branch and will then take precedence over `DBPASS` if that is configured.\n  \n:sparkles: 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).\n\n## Custom Scripts and configuration\n\nYou can invoke your own scripts at certain points of the deployment process. After installing this package you will find\na folder `gitlab-script/` in your root directory with files prefixed with an underscore `_`. Remove the\nunderscore to activate the file and fill it with your own commands.\n\n### `after-composer.sh`\n\nWill be executed in the `composer` job which loads all dependencies and then moves everything to the `.Build` folder\nthat is needed in the next stages and will eventually be deployed. You can use this custom script to influence the\ncontents of `.Build`.\n\n### `build-extensions.sh`\n\nWill be executed in the `build_extensions` job. If your TYPO3 extensions need to be built before the deployment, you\ncan do it here. This job is executed with the [node:8](https://hub.docker.com/_/node/) docker image, which means the\nmachine is well prepared for node based frontend buildings (npm, grunt etc). But your script can also install other\nsoftware you need.\n\n### `pre-deploy.sh`\n\nWill be executed in the `deploy` job, right before the code is actually transfered to the target server. Use this script\nto do last minute preparations on the target server.\n\nHint: In your own scripts you have all your Gitlab CI variables available. So you can perform commands on the target\nserver like this:\n\n    ssh -p $SSH_PORT $SSH_USERNAME@$SSH_HOST \"echo 'Hello from the target server!'\"\n    \n### `rsync-build-excludes.txt`\n\nList files and directories in here that you want to exclude from your whole CI process. This speeds up your CI process\nand lowers disk usage on the runner server. List one file / directory pattern per line.\n\n### `rsync-deploy-excludes.txt`\n\nList files and directories in here that you used in the CI process but don't want to deploy onto the target server.\nIt's good practice and improves security to only ship to the production server what is really needed to run then website.\nList one file / directory pattern per line.\n\n## Versions and updating\n\nThis package uses [semantic versioning](http://semver.org/). So you are encouraged to require\nthe package with `^4.0.0`. Then you can expect receiving bugfix releases and improvements without breaking changes.  \n\n### Breaking Changes:\n\n#### 4.x to 5.x:\n\n* last commit: TYPO3 is now required in version 8.7\n\n#### 3.x to 4.x:\n\n* [88a6e934](https://github.com/smichaelsen/typo3-gitlab-ci/commit/88a6e934d5256e0a76247734266abd42c5c3dabc): PHP is now required in version 7.0\n* [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. \n* [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.\n\n#### 2.x to 3.x:\n\n* [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. \n* [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.\n* [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.\n* [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`\n* [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. \n\n#### 1.x to 2.x:\n\n* 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmichaelsen%2Ftypo3-gitlab-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmichaelsen%2Ftypo3-gitlab-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmichaelsen%2Ftypo3-gitlab-ci/lists"}