代码拉取完成,页面将自动刷新
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:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。