Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Manage Website deployments (for PHP, Perl, Tomcat, ...)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 debian
Octocat-spinner-32 doc
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 ChangeLog
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README.pod
README.pod

rex-apache-deploy is a (R)?ex module to deploy webservers.

You can find (R)?ex under http://rexify.org/

Usage

In your Rexfile use the following commands.

To build a package

 use Rex::Apache::Build;
     
 get_version_from "lib/MyApp.pm", qr{\$VERSION=([^;]+);};
    
 task "build", sub {
    yui compress => glob("public/js/*.js"), glob("public/css/*.css");
        
    # build a package named like the directory
    # and append the version from get_version_from
    build;
          
    # build a package named myapp
    # and append the version from get_version_from
    build "myapp";
         
    # build a package named myapp and append the version 1.5
    build "myapp",
       version => "1.5";
        
    # build a package myapp, with version 1.5 and exclude some files
    # but use the path "./myapp" as package root
    build "myapp",
       version => "1.5",
       path    => "myapp",
       exclude => ["yuicompressor.jar", "README"];
 };

To inject special configuration parameters for different environments

 use Rex::Apache::Inject YAML;

 template_file "inject.conf";
 template_search_for "application.yml";

 desc "Inject Configuration";
 task "inject", sub {

   inject "myapp-1.0.tar.gz",
               pre_pack_hook => sub {
                  run "BUNDLE_PATH=vendor/bundle bundle install";
               },
               post_pack_hool => sub {
                  say "Hello, i'm the post pack hook\n";
               };

 };

Deploy the package

 deploy_to "/path/to/deploy/to";
 document_root "/var/www/html";

 # set this if your package format isn't
 # packagename-version.file-suffix
 # example: myapp-1.2.tar.gz
 #          myapp-1.3.1.zip
 #          myapp-1.3~1.tar.bz2
 #          myapp-1.5.2_1.tar.bz2
 generate_deploy_directory sub {
    return $VERSION;
 };

 desc "Deploy Package";
 task "deploy", group => "fe", sub {
    # just deploy
    deploy;
         
    # or to deploy a specific package
    deploy "myapp-1.0.tar.gz";
 };
Something went wrong with that request. Please try again.