{"id":23120444,"url":"https://github.com/dyerc/capistrano-craft","last_synced_at":"2025-08-17T00:32:14.447Z","repository":{"id":62554969,"uuid":"215337448","full_name":"dyerc/capistrano-craft","owner":"dyerc","description":"Craft CMS specific Capistrano tasks","archived":false,"fork":false,"pushed_at":"2024-10-23T12:27:09.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T08:16:57.221Z","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/dyerc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-15T15:49:12.000Z","updated_at":"2024-10-23T12:27:08.000Z","dependencies_parsed_at":"2024-12-17T06:10:53.806Z","dependency_job_id":"f24a78bf-9064-4254-a7ec-1e18e273d21c","html_url":"https://github.com/dyerc/capistrano-craft","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"8b10e8a1afbc54cbcf69bb8277943bf221a620a1"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/dyerc/capistrano-craft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyerc%2Fcapistrano-craft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyerc%2Fcapistrano-craft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyerc%2Fcapistrano-craft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyerc%2Fcapistrano-craft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyerc","download_url":"https://codeload.github.com/dyerc/capistrano-craft/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyerc%2Fcapistrano-craft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270791255,"owners_count":24645781,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"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":"2024-12-17T06:10:38.759Z","updated_at":"2025-08-17T00:32:14.037Z","avatar_url":"https://github.com/dyerc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Capistrano::Craft\n\nThis gem automates the deployment of Craft CMS apps with Capistrano. It will automatically detect local and remote environment settings to make synchronizing of database and assets straightforward.\n\n- [x] Support for asset and database synchronization\n- [x] Support for PostgreSQL databases\n- [ ] Support for MySQL databases\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'capistrano-craft'\n```\n\nOr install system wide:\n\n    $ gem install capistrano-craft\n\n## Usage\n\nFor a beginners guide to deploying your site (especially useful if you have little to no experience with Ruby) please see this blog article: https://cdyer.co.uk/blog/deploying-craft-cms-to-a-vps-server-with-capistrano\n\nThe setting you will likely need to customize is:\n```\n# This should be your command to compile assets for production\nset :craft_compile_assets, true\nset :craft_compile_assets_command, \"npm install \u0026\u0026 npm run production --production --silent\"\n```\n\nIf you are using PHP-FPM it is necessary to restart it after deployment. Currently capistrano-craft doesn't handle this for you and you may need to add something along the lines of the following to your `deploy.rb` file.\n\n```\nbefore 'deploy:published', 'fpm_restart'\n\ntask :fpm_restart do\n  on release_roles :all do |host|\n    execute \"sudo service php7.3-fpm restart\"\n  end\nend\n```\n\n### Compiling Assets\n\nChange `:craft_compile_assets_command` to be your production asset compilation command. By default, it is assumed your project has a `package.json` file and  `npm install` will be run first. The default asset compilcation command is `npm run production --production --silent`. You can disable asset compilation altogether by settng `:craft_compile_assets` to `false`.\n\n### Synchronize Database\n\n\n### Upgrading Craft CMS\n\nWhen you deploy, Capistrano will run composer automatically installing your chosen packages. If you have upgraded Craft locally, the new version will automatically be installed on your deployment.\n\nIf you were to upgrade on the server, then run `cap production craft:pull` to sync the database and assets down, the database would be running a newer version than your local codebase. This should be easily resolved by updating through Composer or the Craft admin area (assuming Craft runs correctly with the conflict).\n\n### Settings\n\nFull list of available settings:\n\n```\nset :config_path, \"config\"\nset :php, \"php\"\n\nset :craft_local_env, -\u003e { \"#{Dir.pwd}/.env\" }\nset :craft_remote_env, -\u003e { \"#{fetch(:deploy_to)}/shared/.env\" }\n\nset :craft_local_db_dump, \"db.sql\"\nset :craft_local_backups, \"backups\"\nset :craft_remote_backups, \"shared/backups\"\n\n# assets\nset :craft_compile_assets, true                                      \nset :craft_compile_assets_command, \"yarn install \u0026\u0026 yarn run production\"\n\n# console\nset :craft_console_path, -\u003e { \"craft\" }\nset :craft_console_flags, \"\"\n\n# Role filtering\nset :craft_roles, :all\nset :craft_deploy_roles, :all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyerc%2Fcapistrano-craft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyerc%2Fcapistrano-craft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyerc%2Fcapistrano-craft/lists"}