{"id":13614082,"url":"https://github.com/eko/docker-symfony","last_synced_at":"2025-04-08T00:38:42.922Z","repository":{"id":31002925,"uuid":"34561327","full_name":"eko/docker-symfony","owner":"eko","description":"Run a Symfony application using Docker \u0026 docker-compose","archived":false,"fork":false,"pushed_at":"2022-11-20T20:25:16.000Z","size":161,"stargazers_count":1285,"open_issues_count":9,"forks_count":473,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-03-31T23:35:50.617Z","etag":null,"topics":["docker","docker-symfony","kibana","nginx","php-fpm","symfony"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-25T08:33:42.000Z","updated_at":"2025-03-23T10:07:28.000Z","dependencies_parsed_at":"2023-01-14T18:08:37.642Z","dependency_job_id":null,"html_url":"https://github.com/eko/docker-symfony","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/eko%2Fdocker-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eko%2Fdocker-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eko%2Fdocker-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eko%2Fdocker-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eko","download_url":"https://codeload.github.com/eko/docker-symfony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755560,"owners_count":20990620,"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":["docker","docker-symfony","kibana","nginx","php-fpm","symfony"],"created_at":"2024-08-01T20:00:56.613Z","updated_at":"2025-04-08T00:38:42.896Z","avatar_url":"https://github.com/eko.png","language":"Dockerfile","readme":"docker-symfony\n==============\n\n[![Build Status](https://secure.travis-ci.org/eko/docker-symfony.png?branch=master)](http://travis-ci.org/eko/docker-symfony)\n\n\nThis is a complete stack for running Symfony 5 (latest version), PHP8 and ELK stack using docker-compose tool.\n\n# Installation\n\nFirst, clone this repository:\n\n```bash\n$ git clone https://github.com/eko/docker-symfony.git\n```\n\nNext, put your Symfony application into `symfony` folder and do not forget to add `symfony.localhost` in your `/etc/hosts` file.\n\nMake sure you adjust `database_host` in `parameters.yml` to the database container alias \"db\" (for Symfony \u003c 4)\nMake sure you adjust `DATABASE_URL` in `env` to the database container alias \"db\" (for Symfony \u003e= 4)\n\nThen, run:\n\n```bash\n$ docker-compose up\n```\n\nYou are done, you can visit your Symfony application on the following URL: `http://symfony.localhost` (and access Kibana on `http://symfony.localhost:81`)\n\n_Note :_ you can rebuild all Docker images by running:\n\n```bash\n$ docker-compose build\n```\n\n# How it works?\n\nHere are the `docker-compose` built images:\n\n* `db`: This is the MySQL database container (can be changed to postgresql or whatever in `docker-compose.yml` file),\n* `php`: This is the PHP-FPM container including the application volume mounted on,\n* `nginx`: This is the Nginx webserver container in which php volumes are mounted too,\n* `elasticsearch`: This is the Elasticsearch server used to store our web server and application logs,\n* `logstash`: This is the Logstash tool from Elastic Stack that allows to read logs and send them into our Elasticsearch server,\n* `kibana`: This is the Kibana UI that is used to render logs and create beautiful dashboards. \n\nThis results in the following running containers:\n\n```bash\n\u003e $ docker-compose ps\n             Name                           Command               State                 Ports\n-----------------------------------------------------------------------------------------------------------\nmysql                            docker-entrypoint.sh --def ...   Up      0.0.0.0:3306-\u003e3306/tcp, 33060/tcp\nelasticsearch                    /usr/local/bin/docker-entr ...   Up      0.0.0.0:9200-\u003e9200/tcp, 9300/tcp\nkibana                           /usr/local/bin/dumb-init - ...   Up      0.0.0.0:81-\u003e5601/tcp\nlogstash                         /usr/local/bin/docker-entr ...   Up      5044/tcp, 9600/tcp\nnginx                            nginx                            Up      443/tcp, 0.0.0.0:80-\u003e80/tcp\nphp-fpm                          php-fpm7 -F                      Up      0.0.0.0:9000-\u003e9001/tcp\n```\n\n# Environment Customizations\n\nYou can customize the exposed ports and other parameters changing the docker-compose .env file.\n\n# Read logs\n\nYou can access Nginx and Symfony application logs in the following directories on your host machine:\n\n* `logs/nginx`\n* `logs/symfony`\n\n# Use Kibana!\n\nYou can also use Kibana to visualize Nginx \u0026 Symfony logs by visiting `http://symfony.localhost:81`.\n\n# Use xdebug!\n\nStart by updating your docker-compose .env file with `PHP_XDEBUG_MODE=debug` (or any other configuration you need as seen in the [Xdebug documentation](https://xdebug.org/docs/all_settings#mode)).\nYou will need to re-build the php container for this value to take effect.\n\nConfigure your IDE to use port 5902 for XDebug.\nDocker versions below 18.03.1 don't support the Docker variable `host.docker.internal`.  \nIn that case you'd have to swap out `host.docker.internal` with your machine IP address in php-fpm/xdebug.ini.\n\n# Code license\n\nYou are free to use the code in this repository under the terms of the 0-clause BSD license. LICENSE contains a copy of this license.\n","funding_links":[],"categories":["Dockerfile","symfony"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feko%2Fdocker-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feko%2Fdocker-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feko%2Fdocker-symfony/lists"}