{"id":24442034,"url":"https://github.com/jpcaparas/docker-web-stack","last_synced_at":"2025-04-12T20:51:43.305Z","repository":{"id":148877612,"uuid":"92340579","full_name":"jpcaparas/docker-web-stack","owner":"jpcaparas","description":"A Docker Compose-powered stack to get your PHP project running in no time.","archived":false,"fork":false,"pushed_at":"2017-06-08T22:09:29.000Z","size":19,"stargazers_count":48,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T15:05:28.324Z","etag":null,"topics":["docker","docker-compose","mysql","nginx","php"],"latest_commit_sha":null,"homepage":"","language":"Nginx","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/jpcaparas.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-24T22:05:00.000Z","updated_at":"2024-10-23T06:30:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"08e71c9b-440d-47dd-88e2-adeec1106dd0","html_url":"https://github.com/jpcaparas/docker-web-stack","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Fdocker-web-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Fdocker-web-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Fdocker-web-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Fdocker-web-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpcaparas","download_url":"https://codeload.github.com/jpcaparas/docker-web-stack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631728,"owners_count":21136560,"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","mysql","nginx","php"],"created_at":"2025-01-20T21:44:15.708Z","updated_at":"2025-04-12T20:51:43.297Z","avatar_url":"https://github.com/jpcaparas.png","language":"Nginx","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Web Stack\n\n[![Build Status](https://travis-ci.org/jpcaparas/docker-web-stack.svg?branch=master)](https://travis-ci.org/jpcaparas/docker-webapp)\n\n# Overview\n\nDocker Compose makes it easy to interconnect various Docker images. What better way to showcase its features than by\ncreating (yet another) LEMP stack. This is one is much more bleeding edge than others, though :wink:.\n\n# What's inside\n\nA `docker-compose`-powered stack to get your PHP project running in no time.\n\n- PHP-FPM 7.1\n- nginx\n- MariaDB\n- Node w/ Yarn\n\n\n# Requirements\n\n- `Docker` v17.03.1-ce or higher\n- `docker-compose` v1.12 or higher\n\n\n# How-to (simple)\n\nTo start the stack, run:\n\n        docker-compose up -d --build --remove-orphans\n\n- The `-d` flag daemonises the stack.\n- The `--build` builds services (e.g. `php-fpm`, `nginx`) that comprise the stack.\n- The `--remove-orphans` stack ensures that services that aren't being used are deleted (to save disk space).\n\nProvided that no errors were emitted during the start, you should be able to visit your browser on `http://localhost:8080`.\n\n---\n\nTo stop the stack, run:\n\n        docker-compose stop\n\nTo ensure that all services have stopped, run:\n\n        docker-compose ps\n\nThere should be no more services running.\n\n---\n\nTo connect to the MariaDB service, run:\n\n        docker-compose exec mariadb mysql -uapp -p\n\n- This command uses the `app` user. There is also a `root` user.\n- Use the password defined on the `docker-compose.yml` file.\n\n---\n\nTo install composer dependencies, run:\n\n        docker-compose run --rm composer install\n\n- The `--rm` flag ensures that that intermediate (temporary) containers are deleted once you install packages (to save disk space).\n- The service's data is mounted on the `./mariadb` host folder, which means that data will persist between `docker-compose` `up`s and `stop`s.\n\n---\n\nTo install npm packages, run:\n\n        docker-compose run --rm yarn add [name-of-package]\n\n- `yarn` is faster than `npm` and contains a lockfile (`yarn.lock`), for deterministic dependency resolution.\n\n\n# How-to (advanced)\n\nTo enable the Xdebug module:\n\n1. Copy the `.env.example` to an `.env` file and:\n    1. Change the value of `XDEBUG_ON` to `true`\n    1. Change the value of `XDEBUG_REMOTE_HOST` to your host machine's IP address.\n1.  Run `docker-compose up -d --build --remove-orphans` to re-build the service.\n\n---\n\nIf you want to extend the functionality of a service (e.g. php-fpm), you have to re-build it.\n\nTo accomplish this, modify the Dockerfile, then run:\n\n        docker-compose build --no-cache --force-rm [name-of-service]\n\n... followed by a `docker-compose up [arguments...]`\n\n---\n\nIf you want to use a different web server port (e.g. 80), modify the port on the `docker-compose.yml` file\nand start the stack again.\n\n\n# Gotchas\n\nEnsure that the host machine ports `8080` (web server) and `3306` (database) are open on your host machine.\n\n---\n\nYour version of Docker for Mac might ship with v1.11 (an older release) of Docker Compose. You need to upgrade\nto at least v1.12 in order to make this stack work.\n\nFor Linux/macOS users, you can run:\n\n        curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` \u003e /usr/local/bin/docker-compose\n        chmod +x /usr/local/bin/docker-compose\n\nTo check that you are using v1.12 or higher, run:\n\n        docker-compose --version\n\n\n# Warranties\n\n- This stack was built on `macOS Sierra` v10.12.5. Experience may vary on other operating systems.\n\n\n# Attributions\n\n- This wouldn't be possible without being granted a role as Software Developer at [Pixel Fusion](https://pixelfusion.co.nz/),\nan award-winning product development company at Parnell, Auckland.\n- This project was greatly inspired by the [Laradock project](https://github.com/laradock/laradock).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcaparas%2Fdocker-web-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpcaparas%2Fdocker-web-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcaparas%2Fdocker-web-stack/lists"}