This repository contains a modified Symfony Standard Edition Starter app for Google App Engine.
-
Clone the repository with
git clone https://github.com/GoogleCloudPlatform/symfony-standard.git
-
Follow the PHP Tutorial if you have never used App Engine before.
-
Create a CloudSQL instance based on these instructions. Also create a database for storing the Doctrine ORM.
-
Replace
<project-id>
in app.yaml with the corresponding value for your Google Cloud project. By default, the app will store the cache files and logs at a specific location in the app's default GCS bucket. This can be changed by altering theCACHE_DIR
andLOG_DIR
environmental variables in app.yaml. -
Replace
<project-id>
,<instance-id>
and<your-database>
in config_prod.yml with the corresponding value for your Google Cloud project and ClouSQL instance. -
Install composer if you haven't done so previously. To install all required dependencies, run the following command from your project's root, which is the directory that contains composer.json.
php composer.phar install
When prompted for each parameter, press Enter to use the default value.
-
Access your app using http://your_app_id.appspot.com/app/example and you should see Symfony's default welcome page. Note that it may take a while to load the page for the first time as the framework generates and writes the cache files to GCS.
-
If Composer fails to download the dependencies, make sure that your local PHP installation satisfies Composer's system requirements. Specifically, cURL support is required.
-
If you see errors about missing the default Cloud Storage bucket, follow the cloud integration instructions to create a default bucket for your project.
Have a patch that will benefit this project? Awesome! Follow these steps to have it accepted.
- Please sign our Contributor License Agreement.
- Fork this Git repository and make your changes.
- Create a Pull Request
- Incorporate review feedback to your changes.
- Accepted!
All files in this repository are under the MIT License unless noted otherwise.