version: '3'
services:
nginx:
image: nginx
ports:
- '80:80'
- '443:443'
volumes:
- /data/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- /data/nginx/conf/conf.d:/etc/nginx/conf.d
- /data/nginx/logs:/var/log/nginx
- /data/nginx/html:/usr/share/nginx/html
php-fpm:
image: php:7.0-fpm
ports:
- '9000:9000'
volumes:
- /data/nginx/html:/usr/local/php/www
- /usr/local/php/conf:/usr/local/etc/php
- /usr/local/php/logs:/usr/local/php/phplogs
mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=123456
ports:
- '3306:3306'
volumes:
- /data/mysql/conf:/etc/mysql/conf.d
- /data/mysql/logs:/logs
- /data/mysql/data:/var/lib/mysql
记录,docker-compose基础配置
最新推荐文章于 2024-05-30 14:34:55 发布