{"id":13484075,"url":"https://github.com/metowolf/docker-lemp","last_synced_at":"2025-05-15T13:32:16.130Z","repository":{"id":38419216,"uuid":"161473940","full_name":"metowolf/docker-lemp","owner":"metowolf","description":"🐳 Docker 快速搭建 LEMP 开发环境","archived":false,"fork":false,"pushed_at":"2020-05-16T16:07:34.000Z","size":38,"stargazers_count":87,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-03T09:41:38.602Z","etag":null,"topics":["alpine","caddy","docker","lemp","lnmp","mysql","nginx","php","redis"],"latest_commit_sha":null,"homepage":"https://i-meto.com/docker-lemp","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/metowolf.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":"2018-12-12T10:47:03.000Z","updated_at":"2025-02-19T14:03:05.000Z","dependencies_parsed_at":"2022-08-09T04:00:18.365Z","dependency_job_id":null,"html_url":"https://github.com/metowolf/docker-lemp","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/metowolf%2Fdocker-lemp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metowolf%2Fdocker-lemp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metowolf%2Fdocker-lemp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metowolf%2Fdocker-lemp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metowolf","download_url":"https://codeload.github.com/metowolf/docker-lemp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254349485,"owners_count":22056357,"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","caddy","docker","lemp","lnmp","mysql","nginx","php","redis"],"created_at":"2024-07-31T17:01:19.027Z","updated_at":"2025-05-15T13:32:14.354Z","avatar_url":"https://github.com/metowolf.png","language":"PHP","readme":"# Docker LEMP\n\n|name|pulls|version|layers|image size|\n|:---:|:---:|:---:|:---:|:---:|\n|[metowolf/php](https://hub.docker.com/r/metowolf/php)|![Pulls Count](https://img.shields.io/docker/pulls/metowolf/php.svg?style=flat-square)|![GitHub release (latest by date)](https://img.shields.io/github/v/tag/metowolf/docker-php?style=flat-square)|![Layers](https://shields.beevelop.com/docker/image/layers/metowolf/php/latest.svg?style=flat-square)|![image size](https://shields.beevelop.com/docker/image/image-size/metowolf/php/latest.svg?style=flat-square)|\n|[metowolf/nginx](https://hub.docker.com/r/metowolf/nginx)|![Pulls Count](https://img.shields.io/docker/pulls/metowolf/nginx.svg?style=flat-square)|![GitHub release (latest by date)](https://img.shields.io/github/v/tag/metowolf/docker-nginx?style=flat-square)|![](https://shields.beevelop.com/docker/image/layers/metowolf/nginx/latest.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/metowolf/nginx/latest.svg?style=flat-square)|\n|[mysql/mysql-server](https://hub.docker.com/r/mysql/mysql-server)|![Pulls Count](https://img.shields.io/docker/pulls/mysql/mysql-server.svg?style=flat-square)||![](https://shields.beevelop.com/docker/image/layers/mysql/mysql-server/latest.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/mysql/mysql-server/latest.svg?style=flat-square)|\n|[library/redis](https://hub.docker.com/_/redis)|![Pulls Count](https://img.shields.io/docker/pulls/library/redis.svg?style=flat-square)||![](https://shields.beevelop.com/docker/image/layers/library/redis/alpine.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/library/redis/alpine.svg?style=flat-square)|\n|[phpmyadmin/phpmyadmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin)|![Pulls Count](https://img.shields.io/docker/pulls/phpmyadmin/phpmyadmin.svg?style=flat-square)||![](https://shields.beevelop.com/docker/image/layers/phpmyadmin/phpmyadmin/latest.svg?style=flat-square)|![](https://shields.beevelop.com/docker/image/image-size/phpmyadmin/phpmyadmin/latest.svg?style=flat-square)|\n\n## Requirements\n\nInstall [Docker](https://get.docker.com/) and [Compose](https://docs.docker.com/compose/install/)\n\n## Usage\n\n 1. Clone docker-lemp inside your project\n```bash\ngit clone https://github.com/metowolf/docker-lemp.git\n```\n 2. Enter the docker-lemp folder and rename .env.example to .env.\n```bash\ncd docker-lemp\ncp .env.example .env\ncp docker-compose.example.yml docker-compose.yml\n```\n 3. Open your project’s .env file and set the following:\n```ini\nMYSQL_ROOT_PASSWORD=your_password\n```\n 4. Run your containers:\n```bash\ndocker-compose up -d\n```\n\n### Running `QUIC`\n\nThe following configuration file can be used as a starting point to enable HTTP/3 support:\n```nginx\nhttp {\n    server {\n        # Enable QUIC, HTTP/3 and HTTP/2 on both IPv4 and IPv6.\n        listen 443 ssl http2;\n        listen 443 quic;\n        listen [::]:443 ssl http2;\n        listen [::]:443 quic;\n\n        ssl_certificate      cert.crt;\n        ssl_certificate_key  cert.key;\n\n        # Add HSTS header\n        add_header Strict-Transport-Security \"max-age=31536000; includeSubDomains; preload\" always;\n\n        # Add Alt-Svc header to negotiate HTTP/3.\n        add_header alt-svc 'h3-23=\":443\"; ma=86400';\n\n        # Enable specific TLS versions (TLSv1 and TLSv1.1 are not longer saft, TLSv1.3 is required for QUIC).\n        ssl_protocols TLSv1.2 TLSv1.3;\n        ssl_ciphers TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256;\n        ssl_prefer_server_ciphers on;\n        ssl_early_data on;\n    }\n}\n```\n\n## Running `brotli`\n\n 1. Add the following lines into the configuration file of your sites to enable `brotli` feature:\n```nginx\nbrotli on;\nbrotli_comp_level 6;\nbrotli_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;\n```\n\n## Generally Upgrade\n\n 1. Modify project’s .env file.\n```bash\nvim .env\n```\n\n 2. Rebuild containers:\n```bash\ndocker-compose up -d --no-deps --build\n```\n\n## Upgrade to `Caddyless` version\n\n### Before `git pull`\n\n 1. Rename conflicted file if exists:\n```bash\nmv etc/nginx/nginx.conf etc/nginx/nginx.conf.bak\n```\n\n### After `git pull`\n\n 1. Modify project’s .env file.\n```bash\nvim .env\n```\n\n 2. Move Nginx/MySQL/SSL configuration to new directory:\n```bash\n# move nginx configuration\nmv etc/nginx/config/* etc/nginx/conf.d/\n\n# move MySQL configuration\nrm -fr etc/mysql \u0026\u0026 mkdir etc/mysql \u0026\u0026 mkdir etc/mysql/my.cnf.d\nmv etc/database/data etc/mysql \u0026\u0026 mv etc/database/config/* etc/mysql/my.cnf.d\n\n# move SSL configuration\nmv etc/ssl etc/nginx\n```\n\n 3. Rebuild containers and remove the `Caddy` container:\n```bash\ndocker-compose up -d --no-deps --build --remove-orphans\n```\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetowolf%2Fdocker-lemp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetowolf%2Fdocker-lemp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetowolf%2Fdocker-lemp/lists"}