Giter Site home page Giter Site logo

deployer-typo3-ci's Introduction

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, however a lot of functionality comes from deployer-extended-typo3 and it's many meta-packages.

Options

There are several settings defined by default within this package for the most common 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

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

  • production
  • staging
  • local

Set environment

It is advised you set an environment for extra config to be applied. This is set on the host() to allow for different envs for different hosts

host('production')
  ->set('ll_deployer_environment', 'cpanel')
;

Options

  • vps - for a fully self-managed debian based vps
  • cpanel - for a site running with cPanel

Assets upload

This package will upload html/assets if there as well as app/*/Resources/Public, but if you want others that are built then you need to specify them as an array. This can be set globally or on a host by host basis

e.g.

set(
  'll_deployer_asset_paths',
  [
    '{{release_path}}/html/_assets'
  ]
);

.env file upload

You can add the contents of your .env file as a CI/CD variable (ensure "file" is selected in the drop down) and set it as DEPLOY_DOTENV_[ENVIRONMEENT NAME]. This then needs to be set to an environment variable in your .gitlab-ci.yaml of DEPLOY_DOTENV to be deployed.

  variables:
    DEPLOY_DOTENV: $DEPLOY_DOTENV_PRODUCTION

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');
});

deployer-typo3-ci's People

Contributors

mikestreety avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.