{"id":20066430,"url":"https://github.com/mferly/mferly","last_synced_at":"2026-04-11T17:03:45.563Z","repository":{"id":39277345,"uuid":"230770470","full_name":"mferly/mferly","owner":"mferly","description":"Use this boilerplate to spin up a Docker app using PHP-FPM, Symfony5, and Nginx.","archived":false,"fork":false,"pushed_at":"2023-01-05T03:55:10.000Z","size":3938,"stargazers_count":1,"open_issues_count":25,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T23:11:16.239Z","etag":null,"topics":["docker","jquery","nginx","php-fpm","php7","symfony5"],"latest_commit_sha":null,"homepage":"","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/mferly.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":"2019-12-29T15:43:53.000Z","updated_at":"2022-02-12T08:26:29.000Z","dependencies_parsed_at":"2023-02-03T09:46:57.677Z","dependency_job_id":null,"html_url":"https://github.com/mferly/mferly","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/mferly%2Fmferly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mferly%2Fmferly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mferly%2Fmferly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mferly%2Fmferly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mferly","download_url":"https://codeload.github.com/mferly/mferly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241494184,"owners_count":19971871,"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","jquery","nginx","php-fpm","php7","symfony5"],"created_at":"2024-11-13T13:57:06.324Z","updated_at":"2025-12-31T01:06:59.626Z","avatar_url":"https://github.com/mferly.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/mferly/mferly.svg?branch=master)](https://travis-ci.com/mferly/mferly)\n\n# What is this thing?\nHandy boilerplate to get up and running with the following:\n- PHP-FPM v7.4.1\n- Symfony v5.x\n- Nginx\n- Docker\n- jQuery\n- Monolog\n\n# Install/Setup\n\n```bash\n$ git clone git@github.com:mferly/mferly.git\n```\n\nYou'll need to edit a few files before you get up and running. They're are:\n* `./docker/nginx/conf/app.conf`\n    * `root /path/to/your/project;`\n    * `server_name localhost; # assuming you need to`\n    * Setup up SSL if you desire.\n* `./docker/nginx/Dockerfile`\n    * Ensure paths are correct\n    * Setup SSL if desired\n* `./.env`\n    * Change APP_NAME to whatever you want\n        * It's used in:\n            * `docker-compose.yml`\n            * `docker-compose-develop.yml`\n* `./docker-compose.yml`\n    * Not much, if anything, that needs changing in here\n* `./docker-compose-develop.yml`\n    * Changes needed if you want SSL\n* `./Dockerfile`\n    * Add/remove PHP packages as needed\n    * Also check that the following are correct for your env:\n        * `COPY . /var/www/app`\n        * `RUN sh /var/www/app/bin/build.sh`\n\nOnce all of that is sorted out move on down to the 'Run' section (but first check out 'Certs/SSL' if you want SSL).\n\n## Certs/SSL\n\n\u003e **NOTE**: If you don't want to run over HTTPS then you can skip the following set of instructions. However, I'd strongly encourage you to run over HTTPS at all times, especially since it's such an easy setup. Either way, it's setup for both port 80 and 443.\n\nTo create a local self-signed cert I recommend looking into [mkcert](https://github.com/FiloSottile/mkcert). Super simple setup. Eg..\n\n```bash\n$ git clone git@github.com:FiloSottile/mkcert.git\n\n$ cd mkcert\n\n$ mkcert -install\n```\n\nThen you can create a cert for an array of hosts or simply specify a single one..\n\n```bash\n$ mkcert example.local \"*.example.local\" localhost 127.0.0.1 ::1\n\n// or simply\n\n$ mkcert example.local\n```\n\nDon't forget to edit your `/etc/hosts` file if you're using a host other than `localhost`..\n\n```bash\n$ sudo vi /etc/hosts\n\n\u003e\u003e /etc/hosts\n\n// add a line similar to the following..\n\n127.0.0.1       example.local\n```\n\nNow we..\n* Copy those new `.pem` files to `./docker/nginx/certs`\n* Update the following to reflect your new certs (if applicable)\n    * `./docker-compose-develop.yml`\n    * `./Dockerfile-nginx`\n    * `./docker/nginx/conf/self-signed.conf`\n\nAlternatively, when you're ready to go *prime time*, you can look into [Let's Encrypt](https://letsencrypt.org/) as a free solution to your SSL needs. Local, self-signed certs (as we have here) won't suffice in production, but they're easy to setup to get the ball rolling.\n\n# Run\n\n## Build our images\n```bash\n/**\n * Replace PROJECT_NAME with your project name\n *   eg. my_app\n * The following will build and tag your docker images\n *   per PROJECT_NAME\n */\n$ sh ./docker-build.sh PROJECT_NAME\n```\n\n## Dev\n\u003e Develop is mounted to local app directory for ease of development via volumes.\n\n### .env\nUpdate APP_ENV to dev, eg. APP_ENV=dev\n\n### Composer\n```bash\n// let's use the composer.lock file\n$ composer update\n```\n\n### Yarn\n[Install Yarn](https://yarnpkg.com/en/docs/install) and then run it to install the packages in `package.json`.\n```bash\n/**\n * Make sure you have yarn installed\n * Yarn will use the provided yarn.lock file\n */\n$ yarn\n```\n\n```bash\n/**\n * This command will watch changes made to your\n * .css and .js files\n */\n$ yarn run encore dev --watch\n```\n\n### Docker compose\n```bash\n$ docker-compose -f docker-compose-develop.yml up\n```\n\n## Prod\n\u003e For production we don't mount local volumes (obviously).\n\n### .env\nUpdate APP_ENV to prod, eg. APP_ENV=prod\n\n```bash\n$ docker-compose up -d\n```\n\n## Swarm\n```bash\n$ docker stack deploy --compose-file docker-compose.yml app\n```\n\n## Logging\nWe're using Monolog (more specifically the [symfony/monolog-bundle](https://github.com/symfony/monolog-bundle)).\n\nMore resources here:\n* https://github.com/symfony/monolog-bundle\n* https://symfony.com/doc/current/logging.html\n* https://github.com/Seldaek/monolog\n\n## To do\n* Docker alpine images\n* Tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmferly%2Fmferly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmferly%2Fmferly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmferly%2Fmferly/lists"}