2 Star 8 Fork 5

Wildlife/docker-lnmp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 2.16 KB
一键复制 编辑 原始数据 按行查看 历史
Wildlife 提交于 2022-06-06 09:25 . Redis 支持创建初始用户
version: '3'
services:
mariadb:
build:
context: ./mariadb
dockerfile: Dockerfile
args:
MIRROR: repo.huaweicloud.com
image: docker-lnmp-mariadb:latest
ports:
- "3306:3306"
networks:
- backend
volumes:
- ./mariadb/conf.d/:/etc/my.cnf.d/:ro
- ./mariadb/initdb.d/:/initdb.d/:ro
- ./data/logs/mysql/:/var/log/mysql/:rw
- ./data/mysql/:/data/:rw
environment:
MYSQL_DATABASE: www
MYSQL_USER: www
MYSQL_PASSWORD: 123456
# MYSQL_ROOT_PASSWORD: 123456
MYSQL_ROOT_HOST: "%"
restart: always
container_name: mariadb
redis:
build:
context: ./redis
dockerfile: Dockerfile
args:
MIRROR: repo.huaweicloud.com
image: docker-lnmp-redis:latest
ports:
- "6379:6379"
networks:
- backend
volumes:
- ./redis/etc/redis.conf:/etc/redis/redis.conf:ro
- ./data/logs/redis/:/var/log/redis/:rw
- ./data/redis/:/data/:rw
environment:
REDIS_USER: default
REDIS_PASSWORD: 123456
restart: always
container_name: redis
php:
build:
context: ./php
dockerfile: Dockerfile
args:
MIRROR: repo.huaweicloud.com
image: docker-lnmp-php:latest
depends_on:
- mariadb
- redis
ports:
- "9000"
networks:
- frontend
- backend
volumes:
- ./php/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
- ./php/php-fpm.d/:/usr/local/etc/php-fpm.d/:ro
- ./php/php/php.ini-production:/usr/local/etc/php/php.ini:ro
- ./php/php/conf.d/:/usr/local/etc/php/conf.d/:ro
- ./data/logs/php/:/var/log/php/:rw
- ./data/wwwroot/:/data/:rw
restart: always
container_name: php
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
args:
MIRROR: repo.huaweicloud.com
image: docker-lnmp-nginx:latest
depends_on:
- php
ports:
- "80:80"
- "443:443"
networks:
- frontend
volumes:
- ./nginx/conf.d/:/etc/nginx/conf.d/:ro
- ./nginx/ssl/:/etc/nginx/ssl/:ro
- ./data/logs/nginx/:/var/log/nginx/:rw
- ./data/wwwroot/:/data/:rw
restart: always
container_name: nginx
networks:
frontend:
backend:
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Docker
1
https://gitee.com/lanseyujie/docker-lnmp.git
[email protected]:lanseyujie/docker-lnmp.git
lanseyujie
docker-lnmp
docker-lnmp
master

搜索帮助