{"id":20313896,"url":"https://github.com/craftcms/cloud-extension-yii2","last_synced_at":"2025-12-24T16:11:23.636Z","repository":{"id":175399642,"uuid":"573576753","full_name":"craftcms/cloud-extension-yii2","owner":"craftcms","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-01T18:25:06.000Z","size":1672,"stargazers_count":0,"open_issues_count":9,"forks_count":2,"subscribers_count":4,"default_branch":"1.x","last_synced_at":"2025-04-01T19:33:54.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craftcms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2022-12-02T20:00:47.000Z","updated_at":"2025-04-01T18:23:28.000Z","dependencies_parsed_at":"2023-09-25T08:08:56.329Z","dependency_job_id":"c6e1a2ae-6d62-4cbb-9a6b-5e0dea42761c","html_url":"https://github.com/craftcms/cloud-extension-yii2","commit_stats":null,"previous_names":["craftcms/cloud-extension-yii2"],"tags_count":178,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fcloud-extension-yii2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fcloud-extension-yii2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fcloud-extension-yii2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fcloud-extension-yii2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craftcms","download_url":"https://codeload.github.com/craftcms/cloud-extension-yii2/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447600,"owners_count":21105140,"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","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-11-14T18:13:22.560Z","updated_at":"2025-12-24T16:11:23.594Z","avatar_url":"https://github.com/craftcms.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://craftcms.com/cloud\" rel=\"noopener\" target=\"_blank\" title=\"Craft Cloud\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/craftcms/.github/v3/profile/product-icons/craft-cloud.svg\" alt=\"Craft Cloud icon\" width=\"65\"\u003e\u003c/a\u003e\n\n# Craft Cloud Extension\n\nWelcome to [**Craft Cloud**](https://craftcms.com/cloud)!\n\nThis repository contains source code for the `craftcms/cloud` Composer package, which is required to run a Craft project on our first-party hosting platform, Craft Cloud.\n\nWhen installed, the extension automatically [bootstraps](https://www.yiiframework.com/doc/guide/2.0/en/runtime-bootstrapping) itself and makes necessary [application configuration](https://craftcms.com/docs/4.x/config/app.html) changes for the detected environment:\n\n- :cloud_with_lightning: **Cloud:** There’s no infrastructure settings to worry about—database, queue, cache, and session configuration is handled for you.\n- :computer: **Local development:** Craft runs normally, in your favorite [development environment](https://craftcms.com/docs/4.x/installation.html).\n\n:sparkles: To learn more about Cloud, check out [our website](https://craftcms.com/cloud)—or dive right in with [Craft Console](https://console.craftcms.com/cloud). Interested in everything the extension does to get your app ready for Cloud? Read our [Cloud extension deep-dive](https://craftcms.com/knowledge-base/cloud-extension), in the knowledge base.\n\n## Installation\n\nThe Cloud extension can be installed in any existing Craft 4.6+ project by running `php craft setup/cloud`. Craft will add the `craftcms/cloud` package and run the extension’s own setup wizard.\n\n\u003e [!TIP]\n\u003e This process includes the creation of a [`craft-cloud.yaml` configuration file](https://craftcms.com/knowledge-base/cloud-config) which helps Cloud understand your project’s structure and determines which versions of PHP and Node your project will use during builds and at runtime.\n\nWhen you [deploy](https://craftcms.com/knowledge-base/cloud-deployment) a project to Cloud, the `cloud/up` command will run, wrapping Craft’s built-in [`up` command](https://craftcms.com/docs/4.x/console-commands.html#up) and adding the cache and session tables (if they’re not already present).\n\n## Filesystem\n\nWhen setting up your project’s assets, use the provided **Craft Cloud** filesystem type. Read more about [managing assets in Cloud projects](https://craftcms.com/knowledge-base/cloud-assets).\n\n## Developer Features\n\n### Template Helpers\n\n#### `cloud.artifactUrl()`\n\nGenerates a URL to a resource that was uploaded to the CDN during the build and deployment process.\n\n```twig\n{# Output a script tag with a build-specific URL: #}\n\u003cscript src=\"{{ cloud.artifactUrl('dist/js/app.js') }}\"\u003e\u003c/script\u003e\n\n{# You can also use the extension-provided alias: #}\n{% js '@artifactBaseUrl/dist/js/app.js' %}\n```\n\nRead more about [how to use artifact URLs](https://craftcms.com/knowledge-base/cloud-builds#artifact-uRLs).\n\n#### `cloud.isCraftCloud`\n\n`true` when the app detects it is running on Cloud infrastructure, `false` otherwise.\n\n```twig\n{% if cloud.isCraftCloud %}\n  Welcome to Cloud!\n{% endif %}\n```\n\n### Aliases\n\nThe following aliases are available, in addition to [those provided by Craft](https://craftcms.com/docs/4.x/config/#aliases).\n\n#### `@web`\n\nOn Cloud, the `@web` alias is guaranteed to be the correct environment URL for each HTTP context, whether that be a [preview domain](https://craftcms.com/knowledge-base/cloud-domains#preview-domains) or [custom domain](https://craftcms.com/knowledge-base/cloud-domains#adding-a-domain).\n\n#### `@artifactBaseUrl`\n\nEquivalent to [`cloud.artifactUrl()`](#artifactUrl), this allows [Project Config](https://craftcms.com/docs/4.x/project-config.html) settings to take advantage of dynamic, build-specific CDN URLs.\n\n## Configuration\n\nMost configuration (to Craft and the extension itself) is handled directly by Cloud infrastructure, through [environment overrides](https://craftcms.com/docs/4.x/config/#environment-overrides). These options are provided strictly for reference, and have limited utility outside the platform.\n\n| Option                | Type           | Description                                                                                                                     |\n|-----------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------|\n| `artifactBaseUrl`     | `string\\|null` | Directly set a fully-qualified URL to build artifacts.                                                                          |\n| `s3ClientOptions`     | `array`        | Additional settings to pass to the `Aws\\S3\\S3Client` instance when accessing storage APIs.                                      |\n| `cdnBaseUrl`          | `string`       | Used when building URLs to [assets](#filesystem) and other build [artifacts](#artifacturl).                                     |\n| `sqsUrl`              | `string`       | Determines how Craft communicates with the underlying queue provider.                                                           |\n| `projectId`           | `string`       | UUID of the current project.                                                                                                    |\n| `environmentId`       | `string`       | UUID of the current [environment](https://craftcms.com/knowledge-base/cloud-environments).                                      |\n| `buildId`             | `string`       | UUID of the current [build](https://craftcms.com/knowledge-base/cloud-builds).                                                  |\n| `accessKey`           | `string`       | AWS access key, used for communicating with storage APIs.                                                                       |\n| `accessSecret`        | `string`       | AWS access secret, used in conjunction with the `accessKey`.                                                                    |\n| `accessToken`         | `string`       | AWS access token.                                                                                                               |\n| `redisUrl`            | `string`       | Connection string for the environment’s Redis instance.                                                                         |\n| `signingKey`          | `string`       | A secret value used to protect transform URLs against abuse.                                                                    |\n| `useAssetBundleCdn`   | `boolean`      | Whether or not to enable the CDN for asset bundles.                                                                             |\n| `previewDomain`       | `string\\|null` | Set when accessing an environment from its [preview domain](https://craftcms.com/knowledge-base/cloud-domains#preview-domains). |\n| `useQueue`            | `boolean`      | Whether or not to use Cloud’s SQS-backed queue driver.                                                                          |\n| `region`              | `string`       | The app region, chosen when creating the project.                                                                               |\n| `useAssetCdn`         | `boolean`      | Whether or not to enable the CDN for uploaded assets.                                                                           |\n| `useArtifactCdn`      | `boolean`      | Whether or not to enable the CDN for build artifacts and asset bundles.                                                         |\n| `staticCacheDuration` | `int`          | The default duration, in seconds, to statically cache requests.                                                                 |\nThese options can also be set via environment overrides beginning with `CRAFT_CLOUD_`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fcloud-extension-yii2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraftcms%2Fcloud-extension-yii2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fcloud-extension-yii2/lists"}