{"id":21292297,"url":"https://github.com/steadywool/lemp-container","last_synced_at":"2025-07-11T16:31:26.293Z","repository":{"id":150019169,"uuid":"467842154","full_name":"steadywool/lemp-container","owner":"steadywool","description":"Simple LEMP stack using containers.","archived":false,"fork":false,"pushed_at":"2023-06-16T18:36:44.000Z","size":88,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-02T20:07:15.133Z","etag":null,"topics":["alpine","docker","docker-compose","lemp-stack","mariadb","nginx","npm","oci-image","php-fpm","phpmyadmin"],"latest_commit_sha":null,"homepage":"","language":null,"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/steadywool.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}},"created_at":"2022-03-09T08:36:02.000Z","updated_at":"2023-09-23T07:39:35.000Z","dependencies_parsed_at":"2023-08-23T20:47:18.931Z","dependency_job_id":null,"html_url":"https://github.com/steadywool/lemp-container","commit_stats":null,"previous_names":["steadywool/lemp-container","kaniville/lemp-container"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadywool%2Flemp-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadywool%2Flemp-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadywool%2Flemp-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadywool%2Flemp-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steadywool","download_url":"https://codeload.github.com/steadywool/lemp-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225741243,"owners_count":17516895,"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":["alpine","docker","docker-compose","lemp-stack","mariadb","nginx","npm","oci-image","php-fpm","phpmyadmin"],"created_at":"2024-11-21T13:49:01.390Z","updated_at":"2024-11-21T13:49:02.032Z","avatar_url":"https://github.com/steadywool.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐋 LEMP Container\n\nLEMP Container that can be used with Docker \u0026 Podman.\n\n## 🔬 Features\n\n- [Nginx Alpine (reverse proxy server)](https://hub.docker.com/_/nginx)\n\n- [MariaDB (database server)](https://hub.docker.com/_/mariadb)\n\n- [PHP FPM (server-side scripting language)](https://hub.docker.com/_/php)\n\n- [NodeJS (JavaScript runtime environment)](https://hub.docker.com/_/node)\n\n- [PhpMyAdmin (MySQL/MariaDB interface)](https://hub.docker.com/_/phpmyadmin)\n\n## 🚀 Installation\n\nTo install this LEMP Stack, you need to install `docker` \u0026 `docker-compose` as root:\n```bash\n# On Debian or Ubuntu\napt install docker docker-compose\n\n# On Archlinux\npacman -S docker docker-compose\n```\n\nThen clone this repository using `git`:\n```\ngit clone https://github.com/kaniville/lemp-container.git\n```\n\nYou need to start the Docker service as root:\n```\nsystemctl enable docker.service\nsystemctl start docker.service\n```\n\n## 💎 Usage\n\nTo start the container, go inside the `lemp-container` directory and run:\n```\ndocker compose up -d\n```\n\nTo stop the container, replace `up -d` with `down` like this:\n```\ndocker compose down\n```\n\nYou can see if the LEMP stack is running with the option `ps`:\n```\ndocker compose ps\n```\n\n\u003e ⚠️ **BE CAREFUL: by default Docker need root access. Use Podman or Docker in rootless mode if you care about security.**\n\nAfter the container has been started, you can access your LEMP server from `localhost` with your favorite web browser.\n\nPhpMyAdmin is available at `localhost:8080`.\n\n## 📘 FAQ\n\n- **Why can't I communicate with my database ?**\n\nIn your `*.php` files, when you configure the database host, use `mariadb` instead of `localhost`:\n```php\n$conn = mysqli_connect('mariadb', 'USER', 'PASSWORD', 'DATABASE' , \"PORT\");\n```\n\n- **How can I use another port for the Nginx server instead of `80` ?**\n\nStop the containers \u0026 modify the docker-compose.yml file like this:\n```yml\n nginx:\n    image: docker.io/nginx:alpine\n    ports:\n      # If you want to change the used port, modify the first one\n      - 127.0.0.1:1080:80 # Nginx+Php server\n      - 127.0.0.1:1081:8080 # Phpmyadmin\n```\n\nHere Nginx uses port `1080` instead of `80` and PhpMyAdmin uses port `1081` instead of `8080`.\n\n\u003e ⚠️ **BEWARE: By default, Docker \u0026 Podman rootless can't expose privileged TCP/UDP ports (\u003c1024).**\n\n- **I can't access this server from other devices on the same network !**\n\nYou need to remove the two \"127.0.0.1\" from the `docker-compose.yml` file like this:\n```yml\n nginx:\n    image: docker.io/nginx:alpine\n    ports:\n      # If you want to connect from other devices on the same network, remove the two \"127.0.0.1:\"\n      - 80:80 # Nginx+Php server\n      - 8080:8080 # Phpmyadmin\n```\n\n- **I can't use this thing with a Raspberry Pi !**\n\nYou can change the image user for Mysql to one compatible with the architecture of a Raspberry Pi.\n\n```yml\nmariadb:\n    # Use this image instead of the official one\n    image: monstrenyatko/rpi-mariadb # RPI image\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadywool%2Flemp-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteadywool%2Flemp-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadywool%2Flemp-container/lists"}