{"id":20021977,"url":"https://github.com/haehnchen/docker-symfony-multiproject","last_synced_at":"2026-04-09T22:33:23.400Z","repository":{"id":144802242,"uuid":"260461419","full_name":"Haehnchen/docker-symfony-multiproject","owner":"Haehnchen","description":"A template for a common Docker Symfony stack, allowing multiple projects and provides all common php extension.","archived":false,"fork":false,"pushed_at":"2022-04-30T11:58:43.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-12T16:33:01.502Z","etag":null,"topics":["docker","docker-compose","docker-compose-template","nginx","php","symfony"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/Haehnchen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-05-01T13:07:42.000Z","updated_at":"2024-06-10T23:24:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"1afa1269-00b1-4815-9ee6-b1bb7f49eaba","html_url":"https://github.com/Haehnchen/docker-symfony-multiproject","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haehnchen%2Fdocker-symfony-multiproject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haehnchen%2Fdocker-symfony-multiproject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haehnchen%2Fdocker-symfony-multiproject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haehnchen%2Fdocker-symfony-multiproject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haehnchen","download_url":"https://codeload.github.com/Haehnchen/docker-symfony-multiproject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241455380,"owners_count":19965602,"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-compose","docker-compose-template","nginx","php","symfony"],"created_at":"2024-11-13T08:38:48.338Z","updated_at":"2026-04-09T22:33:23.336Z","avatar_url":"https://github.com/Haehnchen.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"A template for a common Docker Symfony stack, allowing multiple projects (`xxx.local =\u003e www/xxx/public/index.php`) and provides all common php extensions.\n\n# TEMPLATE Docker Stack\n\nProvides a local development environment for the TEMPLATE and its required projects.\n\nBased on: \u003chttps://github.com/maxpou/docker-symfony\u003e\n\nEach project provides its own Docker container\n\n## Technology Stack\n\n - PHP X.X\n - XDebug (activate via \"WITH_XDEBUG=true\" inside dotenv)\n - MariaDB X.X\n - nodejs / gulp / yarn / webpack\n - Mailcatcher for local mailing\n - local SSH Key injecting\n \n## Mountpoints\n \n - `.data` For general storage eg: database\n - `www/\u003cproject-name\u003e` Webserver root for projects (you can just add more by adding container in same Symfony structure) \n - `install.sh` and `update.sh` for all projects inside container to build and update maintenance \n\n## Exposed Ports\n \n You can access container application directly via localhost\n \n - Webserver: 80 (http only)\n - MySql / MariaDB: 3306 (User: \"root\"; Password: \"admin\")\n - Mailcatcher: 1080 (\u003chttp://127.0.0.1:1080\u003e)\n \n## Mac User\n\nFor Mac users it's important to not use the Docker provided by the Homebrew package installer. If you do so, you will probably run into problems with \"WARNING: Connection pool is full, discarding connection\" warnings. Using the \"original\" Docker install package from [docker.com](https://www.docker.com) will solve problems like that.\n\n## Manual Installation\n\n1. Create a `.env` from the `.env.dist` file. Adapt it according to your symfony application\n\n    ```bash\n    cp .env.dist .env\n    ```\n    \n    * For Windows you must also provide a PWD variable with the project dir in `.env` see documentation inside file, if you are not taking the nfs mount stuff opt of \"Optimizations\" section\n\n2. Update your system host file\n\n    ```bash\n    127.0.0.1 TEMPLATE.local\n    ```\n\n3. Inject SSH storage\n\n    If you need access to ssh key related stuff have valid ssh key inside local folder: `~/.ssh/id_rsa`\n    \n    Docker secret features is taken: https://docs.docker.com/compose/compose-file/#secrets\n   \n4. Build/run containers\n\n    ```bash\n   docker-compose build\n    \n   # Run visible; eh good for first run to see output\n   docker-compose up\n    \n   # Run in background\n   # docker-compose up -d\n    ```\n\n5. Prepare Projects\n    1. Install projects via build container\n\n        ```bash\n        docker-compose run --rm php-cli bash -c \"/var/install.sh\"\n       \n        # or via make\n        make install\n        ```\n \n    2. Create the databases\n    \n        Boot up the stack if not already done\n    \n        ```\n        docker-compose up -d\n        ```\n       \n        Create database\n        \n        ```\n        docker-compose exec db bash -c \"mysql -u root -padmin -e 'create database TEMPLATE'\"\n        ```\n       \n    3. Check project\n        \n        The `www` contains all projects and nginx just you any subfolder you provide as subdomain `TEMPLATE` =\u003e `TEMPLATE.local`.\n    \n6. Enjoy\n  \n    Open browser with: \u003chttp://TEMPLATE.local\u003e\n\n\n# Project Tasks\n\n`make` is used for several regular scripts task.\n\n## Updating\n\nUpdate includes\n\n - checkout develop branch\n - composer install\n - build frontend\n\n```\nmake update\n```\n        \n## Optimizations\n\n### Mounting NFS filesystem to speed up file access\n\nFor speeding up the file access for non Linux user you can use for example an NFS server mount via provided scripts.\nDepending on your OS change `NFS_MOUNT_WWW` the variable inside `.env` for the project `www` folder\n\n#### MacOS \n\n`NFS_MOUNT_WWW` must be absolute and inside the Users folder structure. Execute the bash file to configure the nfs server\n    \n    ```bash\n    ./nfs_macos.sh\n    ```\n   \n#### Windows \n\n - Set `NFS_MOUNT_WWW` to /www\n - \u003chttps://github.com/winnfsd/winnfsd/releases\u003e download latest version and put this into the folder `winnfsd`.\n - Force the `winnfsd.exe` to execute as admin user via the Windows Configuration tab. (right click the file and go to Security)\n - Run the follong script inside a cmd window\n \n    ```bash\n    nfs_windows.bat\n    ```\n    \n#### Run with NFS mount \n\nRun docker-compose up using the nfs configuration file\n\n    ```bash\n    docker-compose -f docker-compose.yml -f docker-compose.nfs.yml up -d\n    ```    \n\nTo make this persisted you can also just copy `docker-compose.nfs.yml` to `docker-compose.override.yml`\n\n## FAQ\n\n**Permission problem? (docker: Got permission denied while trying to connect to the Docker daemon socket at)**\n\n```\nsudo groupadd docker\nsudo usermod -aG docker $USER\nsudo chmod 666 /var/run/docker.sock\n# restart / relogin \n```\n\nelse:\n\n - https://docs.docker.com/engine/install/linux-postinstall/ \n - See [this doc (Setting up Permission)](http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup)\n\n**How to config Xdebug?**\n\nXdebug is configured out of the box!\nJust config your IDE to connect port  `9001` and id key `PHPSTORM`\n\n-------------\n\n# Origin README\n\nSee also some main project: \u003chttps://github.com/maxpou/docker-symfony\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaehnchen%2Fdocker-symfony-multiproject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaehnchen%2Fdocker-symfony-multiproject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaehnchen%2Fdocker-symfony-multiproject/lists"}