{"id":18649987,"url":"https://github.com/bkuhl/fpm-nginx","last_synced_at":"2025-04-11T14:32:36.255Z","repository":{"id":20453642,"uuid":"89952714","full_name":"bkuhl/fpm-nginx","owner":"bkuhl","description":"A single container with fpm \u0026 nginx with Laravel dependencies","archived":false,"fork":false,"pushed_at":"2025-03-19T11:57:44.000Z","size":113,"stargazers_count":52,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T12:36:55.199Z","etag":null,"topics":["docker","laravel","nginx","php","php-fpm"],"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/bkuhl.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":"2017-05-01T18:52:49.000Z","updated_at":"2025-03-19T11:57:16.000Z","dependencies_parsed_at":"2024-11-07T06:42:15.337Z","dependency_job_id":"99c5cffa-3e95-4dda-abb0-ac2269d061af","html_url":"https://github.com/bkuhl/fpm-nginx","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkuhl%2Ffpm-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkuhl%2Ffpm-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkuhl%2Ffpm-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkuhl%2Ffpm-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bkuhl","download_url":"https://codeload.github.com/bkuhl/fpm-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248419761,"owners_count":21100246,"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","laravel","nginx","php","php-fpm"],"created_at":"2024-11-07T06:42:05.420Z","updated_at":"2025-04-11T14:32:35.957Z","avatar_url":"https://github.com/bkuhl.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FPM/Nginx - [Dockerhub Repo](https://hub.docker.com/r/bkuhl/fpm-nginx/)\n\nThis container is intended to run Laravel applications and thus comes with a few items to assist:\n\n * [Composer](https://getcomposer.org)\n * PHP Extensions\n   * [mbstring](http://php.net/manual/en/book.mbstring.php)\n   * [pdo_mysql](http://php.net/manual/en/ref.pdo-mysql.php)\n   * [gd](http://php.net/manual/en/book.image.php)\n   * [opcache](http://php.net/manual/en/book.opcache.php) - Automatically enabled when `APP_ENV=production`\n   * [xdebug](https://xdebug.org) - Only enabled when `XDEBUG_ENABLE=true`.  Only installed when `XDEBUG_ENABLE=true` when building the container\n * Adding a default virtual host serving apps from `/var/www/html/public`\n   \nFor Laravel applications, see [bkuhl/laravel-fpm-nginx](https://github.com/bkuhl/laravel-fpm-nginx).\n\nFor a container to run cron and other CLI tasks, check out [bkuhl/php](https://github.com/bkuhl/php).\n\n**Why 2 processes in 1 container?**\n\n 1. DNS issues - Both the fpm/nginx containers need to be redeployed when your application is updated.  Nginx maintains an internal DNS cache, so while Docker may ensure zero downtime for fpm containers, nginx's internal workings can still create problems.  The only way to solve this (that I've found) is to restart the nginx process.  Having them on the same container eliminates the problem.\n 2. Laravel Mix - The front/backend of applications are kind of coupled when using something like Laravel Mix.  The index of assets it creates need to be on both containers and running these separately is possible, but redundant.  \n\n## Adding Processes\n\nThis container uses [S6 Overlay](https://github.com/just-containers/s6-overlay) as it's process monitoring solution.  Add a new directory to `services.d` with a `run` file in it where `run` in a shell script that kicks off the process.  The rest is taken care of for you.\n\n## Example Dockerfile\n\n```\nFROM bkuhl/fpm-nginx:latest\n\nWORKDIR /var/www/html\n\n# Copy the application files to the container\nADD --chown=www-data:www-data  . /var/www/html\n\nUSER www-data\n\nRUN composer install  --no-interaction --optimize-autoloader --no-dev --no-cache --prefer-dist\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkuhl%2Ffpm-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkuhl%2Ffpm-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkuhl%2Ffpm-nginx/lists"}