{"id":15529053,"url":"https://github.com/alexander-schranz/aws-elastic-beanstalk-php-symfony-example","last_synced_at":"2025-04-23T12:41:45.903Z","repository":{"id":41200998,"uuid":"502015718","full_name":"alexander-schranz/AWS-Elastic-Beanstalk-PHP-Symfony-Example","owner":"alexander-schranz","description":"Example Elastibeanstalk PHP Symfony Files","archived":false,"fork":false,"pushed_at":"2022-06-29T16:21:09.000Z","size":20,"stargazers_count":12,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T23:41:19.212Z","etag":null,"topics":["aws-elastic-beanstalk","aws-elasticbeanstalk","deployment","doctrine","php","redis","symfony"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/alexander-schranz.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}},"created_at":"2022-06-10T11:21:19.000Z","updated_at":"2024-10-15T09:12:53.000Z","dependencies_parsed_at":"2022-08-26T22:40:23.312Z","dependency_job_id":null,"html_url":"https://github.com/alexander-schranz/AWS-Elastic-Beanstalk-PHP-Symfony-Example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2FAWS-Elastic-Beanstalk-PHP-Symfony-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2FAWS-Elastic-Beanstalk-PHP-Symfony-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2FAWS-Elastic-Beanstalk-PHP-Symfony-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2FAWS-Elastic-Beanstalk-PHP-Symfony-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexander-schranz","download_url":"https://codeload.github.com/alexander-schranz/AWS-Elastic-Beanstalk-PHP-Symfony-Example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250436757,"owners_count":21430543,"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":["aws-elastic-beanstalk","aws-elasticbeanstalk","deployment","doctrine","php","redis","symfony"],"created_at":"2024-10-02T11:16:06.360Z","updated_at":"2025-04-23T12:41:45.831Z","avatar_url":"https://github.com/alexander-schranz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Elasticbeansstalk PHP Symfony Example\n\nThis repository should help others how to deploy your Symfony application to AWS Elasticbeansstalk PHP instances.\n\n## Requires\n\n - Elasticbeanstalk instance\n - DB Instance\n - Configured ENV Variables (configured via AWS UI)\n   - `APP_ENV`\n   - `DATABASE_URL`\n   - `MESSENGER_TRANSPORT_DSN` (if messenger is used)\n   - `MAILER_DSN` (if mailer is used)\n - Gitlab ENV Variables (if gitlab is used for deployment, configured via Gitlab UI)\n    - `AWS_ACCESS_KEY_ID`\n    - `AWS_SECRET_ACCESS_KEY`\n\n## Features\n\n - composer optimization ([.ebextensions/composer.config](.ebextensions/composer.config))\n - cronjob configuration ([.ebextensions/cron-linux.config](.ebextensions/cron-linux.config))\n - doctrine migration configuration ([.ebextensions/migration.config](.ebextensions/migration.config))\n - php configuration ([.ebextensions/php.config](.ebextensions/php.config))\n   - redis extension included \n - publicdir configuration ([.ebextensions/publicdir.config](.ebextensions/publicdir.config))\n - supervisor configuration ([.ebextensions/supervisor.config](.ebextensions/supervisor.config))\n - nginx vhost ([.platform/nginx/conf.d/elasticbeanstalk/php.conf](.platform/nginx/conf.d/elasticbeanstalk/php.conf))\n - gitlab deployment ([.gitlab-ci.yml](.gitlab-ci.yml) / [.gitlab/create_aws_config.sh](.gitlab/create_aws_config.sh))\n\n## Feedback welcome\n\nYou did struggle with something let me know. So we can here add more faqs to help others avoiding same problems.\n\n## FAQ\n\n### Deploy locally\n\nYou can deploy when you have eb installed (MacOS `brew install awsebcli`) via:\n\n```bash\neb init \"Your Application Name\" --platform \"PHP 8.0 running on 64bit Amazon Linux 2\" --region=eu-central-1 --profile=eb-cli\neb deploy\n```\n\n### Debug Deploy errors\n\nYou can use following command to debug deploy errors:\n\n```bash\neb logs\n```\n\nThe full logs you can download via the AWS Website. In my case following logs did help\n\n - `eb-engine.log`\n - `cfn-init.log`\n - `cfn-init-cmd.log` (this log file helped me find illegal syntax in my `command` scripts)\n\n### Forcing HTTPS\n\nIn the `.platform/nginx/conf.d/elasticbeanstalk/nginx.conf` it is possible to force https.\nVia: \n\n```nginx\n    fastcgi_param HTTPS on;\n```\n\nI could not get it work via `x-forwarded-*` headers as the were not send to my instance.\n\n### Cronjob only on one Instance\n\nIf your applicaton is running with multiple instances it is maybe important that your cronjobs\nonly run on one instance for this have a look at the following issue and example:\n\n[https://github.com/alexander-schranz/AWS-Elastic-Beanstalk-PHP-Symfony-Example/issues/1](https://github.com/alexander-schranz/AWS-Elastic-Beanstalk-PHP-Symfony-Example/issues/1).\n\n### Permission denied install_supervisor\n\nIf you have problem to deploy with supervisor and have following in your `cfn-init-cmd.log`:\n\n```bash\n/bin/sh: .ebextensions/supervisor/setup.sh: Permission denied\n```\n\nIt could be an error with the `setup.sh` not being executable so make it executable via:\n\n```bash\nchmod +x .ebextensions/supervisor/setup.sh: \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-schranz%2Faws-elastic-beanstalk-php-symfony-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexander-schranz%2Faws-elastic-beanstalk-php-symfony-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-schranz%2Faws-elastic-beanstalk-php-symfony-example/lists"}