Using Deployer for deployment management with generating new tags in github.com

Deployer is a great tool we used in our last ongoing project in Symfony 4.2, php7.3, MariaDB, github. Development of customer portal requires a continuous deployment to staging and production according to Lean Development approach. Crucial part was security issue and regulations. Deployer written in PHP with wide amount of recipes including Symfony4.2. The code […]
updated: May 9, 2019 at 12:49PM | published: Aug 11, 2017

Deployer is a great tool we used in our last ongoing project in Symfony 4.2, php7.3, MariaDB, github.

Development of customer portal requires a continuous deployment to staging and production according to Lean Development approach. Crucial part was security issue and regulations.

Deployer written in PHP with wide amount of recipes including Symfony4.2. The code of the tool is really clean and understandable. Easy and straightforward configuration in nomad style buys you off the moment you dive into API.

Documentation at this moment good enough if you are not required to do stuff out of the box.In other way – open the code and look like other tasks are implemented. No judgment, cause developer has done a great job and tool still in the state of forming.

check it here https://deployer.org/

The only issue I’ve faced – symlinks. Cause NGINX/php-fpm are not really happy with symlinks. So we have added extra task on after deployment:

task('nginx:reload', function () {
    run('service nginx reload');
    run('service php7.3-fpm restart');
})->desc('reload nginx for symlink to current');
after('deploy:unlock', 'nginx:reload');

But it is not all. On every deployment staging or production it is great to have a reference point in repository. Tag with a date, time, deployment number and deployment type would be good enough. Automating this part would be great! With deployer life is really easy, just a couple of lines we have wrote and we were done! Chill!

And the task code itself:

task('git:tag', function () {
    $git = get('bin/git');

    $release = get('release_name');
    $date = run('date +"%Y%m%d%H%M%S"');
    $stage = get('stage');

    $releaseTag = $stage . '.' . $release . '.' . $date;
    run("cd {{release_path}} && $git tag $releaseTag");
    run("cd {{release_path}} && $git push origin --tags");
})->desc('Adding new deployment tags to repo');
// run automatically in the end of deployment process
after('deploy:unlock', 'git:tag');

Link to github example gist: https://gist.github.com/max4kaps/6867cdfc14aa91262f88c173e7f67558


Smart portal the answer for your company’s growth

Smart portal the answer for your company’s growth

In the beginning of my career I've dived directly into the world of enterprise management software development. ERP, CRM, interconnections, gateways, dashboard and what not more. It is always an interesting question that I still ask myself every time when I'm advising...

read more
greating.nl on #Horecava2020

greating.nl on #Horecava2020

Today is a nice day for Lagosse Chocolate. They are launching their new product greating.nl on the # Horecava2020 today.4BIS.nl worked together with StyleMathot on this e-commerce tool that allows customers to personalize the wraps of their chocolate!...

read more

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

Software ontwikkeling op maat

Hoe werkt het?

Wat wonderen doet voor het ene bedrijf kan zinloos zijn voor een ander bedrijf. Daarom hebben we oplossingen op maat die het unieke karakter van jouw bedrijf respecteren. We werken in een positieve spiraal van testen, monitoren en verzamelen gegevens om precies te weten te komen wat voor jou werkt en wat niet. Het is onze ‘whole package’-mindset, een aandacht voor details die ons in staat stelt om elke keer jouw prestatiedoelstellingen te bereiken. Dus ontspan en geniet van de rit!