{"id":34638792,"url":"https://github.com/generoi/capistrano-tasks","last_synced_at":"2026-05-29T09:31:24.306Z","repository":{"id":12386565,"uuid":"15038768","full_name":"generoi/capistrano-tasks","owner":"generoi","description":"Capistrano 3 tasks for Drupal sites","archived":false,"fork":false,"pushed_at":"2018-11-14T17:47:18.000Z","size":60,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-12-26T06:16:19.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/generoi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-09T05:13:31.000Z","updated_at":"2018-11-14T17:46:31.000Z","dependencies_parsed_at":"2022-09-24T18:12:04.447Z","dependency_job_id":null,"html_url":"https://github.com/generoi/capistrano-tasks","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/generoi/capistrano-tasks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fcapistrano-tasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fcapistrano-tasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fcapistrano-tasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fcapistrano-tasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generoi","download_url":"https://codeload.github.com/generoi/capistrano-tasks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fcapistrano-tasks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33646420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-12-24T17:13:18.523Z","updated_at":"2026-05-29T09:31:24.287Z","avatar_url":"https://github.com/generoi.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Capistrano 3 tasks used by Genero Wordpress and Drupal sites.\n\nNOTE! These tasks are **NOT** configured for multiple roles!\n\nRun `cap -T` to display all available tasks.\n\n*Note: if comands do not work, run the commands directly through bundle instead:**\n\n```\nbundle exec cap production deploy\n```\n\n### Dependencies: (these you must install by yourself)\n\n- PHP 5.6+\n- Drush 8+ for Drupal specific tasks\n- `wp-cli` for a few Wordpress tasks.\n- GnuPG (not on osx by default)\n- rsync\n\nDevelopment environment\n-----------------------\n\n\u003e Located on your own machine but running inside a virtual machine. All the development is done on the host machine, while mysql, apache etc are on the guest machine.\n\n\n_Note that all of these tasks should run on your local machine._\n\n### Deploy\n\n```sh\n# Add your key to the authorization agent for connecting to production.\neval $(ssh-agent -s)\nssh-add\n\n# Deploy to the production environment\ncap production deploy\n\n# Deploy to our staging environment\ncap staging deploy\n\n# Simply sync our compiled assets (these might be overriden on next deploy)\ncap staging assets:push\n\n# Push our local files to staging environment, overriding older files, but\n# leaving untouched/unexisting files.\ncap staging files:push\n\n# Push git staged files to staging environment. This is simply rsynced and will\n# be removed with the next proper deploy. It only exists for you to stop making\n# repetitive fix commits. LEARN NOT TO NEED THIS!\ncap staging deploy:temporary\n```\n\n### Logs and services\n\n```sh\n# Tail some logs\ncap production logs:apache_access\ncap production logs:apache_error\ncap production logs:varnish\ncap production logs:htop\n\n# Display summary of running services (if monit is setup)\ncap production monit:summary\ncap production monit:status\n\n# Control services\ncap staging service:apache:graceful\ncap staging service:mysql:start\ncap staging service:varnish:restart\n\n# Open a SSH connectino to production.\ncap production ssh\n```\n\n### Drupal specific tasks\n\n\n```sh\n# Maintenance mode\ncap production drush:offline\ncap production drush:online\n\n# Backup database (on the remote host)\ncap production drush:backupdb\n\n# Interactively import database (on the remote host)\ncap production drush:importdb\n\n# Run database updates\ncap production drush:updatedb\n\n# Clear all caches on production.\ncap production cache\n\n# Clear all Drupal caches on production.\ncap production cache:all\n\n# Clear the varnish cache on production.\ncap production cache:varnish\n\n# Clear the APC cache on production (some weird php bugs).\ncap production cache:apc\n\n# Clear the asset caches on production.\ncap production cache:cssjs\n```\n\n### Laravel specific tasks\n\n```sh\n# Execute a provided artisan command.\n# Replace :command_name with the command to execute\ninvoke 'laravel:artisan[:command_name]'\n\n# Create a cache file for faster configuration loading\ninvoke 'laravel:config_cache'\n\n# Create a route cache file for faster route registration\ninvoke 'laravel:route_cache'\n\n# Create a symbolic link from \"public/storage\" to \"storage/app/public\"\ninvoke 'laravel:storage_link'\n\n# Run the database migrations.\ninvoke 'laravel:migrate'\n\n# Rollback the last database migration.\ninvoke 'laravel:migrate_rollback'\n\n```\n\n### Wordpress specific tasks\n\n```sh\n# Clear the Timber cache\ncap production wp:cache:timber\n\n# Clear the Autoptimize cache\ncap production wp:cache:autoptimize\n\n# Clear the WP Super Cache cache\ncap production wp:cache:wpsc\n\n# Clear the WP object cache (requires wp-cli)\ncap production wp:cache:objectcache\n\n```\n\nStaging environment\n-------------------\n\n\u003e Located on _minasanor.genero.fi_, within /var/www/staging/`\u003cPROJECT\u003e` as a\n\u003e capistrano target (setup using `current`, `release`, etc folders).\n\n#### Setup\n\n1. Configure the capistrano settings for staging in `config/deploy/staging.rb`\n2. Scaffold the capistrano folder structure by running the following from **your own development machine**.\n\n    ```sh\n    # Drupal\n    cap staging setup\n\n    # Wordpress\n    cap staging wp:setup\n    ```\n\n3. Done.\n\nProduction\n----------\n\n\u003e Located on the live server.\n\n#### Setup\n\n1. Setup the environment (apache, php, apc/opcache, varnish, squid, memcached, etc.)\n2. Setup the deploy user according to [Capistrano's guides](http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/)\n3. Configure the capistrano settings for production: `config/deploy/production.rb`\n4. Scaffold the capistrano folder structure by running the following from **your own development machine**.\n\n    ```sh\n    # Drupal\n    cap production setup\n\n    # Wordpress\n    cap production wp:setup\n    ```\n\n5. Probably not done, you should update this readme with whatever\n   issues you found :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneroi%2Fcapistrano-tasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeneroi%2Fcapistrano-tasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneroi%2Fcapistrano-tasks/lists"}