更新php到7.3; 更改IP; 修改hmtl 目录

This commit is contained in:
chinky 2019-09-23 19:51:52 +08:00
parent 807049767d
commit 7e18d9daeb
3 changed files with 9 additions and 8 deletions

View File

@ -1,6 +1,7 @@
# php-nginx-mysql-compose
docker-compose php + nginx + mysql
参考[ocker-compose搭建nginx+php+mysql](https://www.jianshu.com/p/0561d3cfccda)
## 安装docker
```

View File

@ -12,18 +12,18 @@ services:
volumes:
# 映射主机./conf.d目录到容器/etc/nginx/conf.d目录
- "$PWD/conf.d:/etc/nginx/conf.d"
- "$PWD/html:/usr/share/nginx/html"
- "/sharedfolders/web/site80/html:/usr/share/nginx/html"
networks:
- app_net
# 容器名称
container_name: "compose-nginx"
php:
build: ./php-mysqli
image: php:7.2-fpm-mysqli
image: php:7.3-fpm-mysqli
ports:
- "9000:9000"
volumes:
- "$PWD/html:/var/www/html"
- "/sharedfolders/web/site80/html:/var/www/html"
networks:
- app_net
container_name: "compose-php"
@ -34,11 +34,11 @@ services:
# 环境变量
environment:
# mysql密码
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_ROOT_PASSWORD=lldlcj123
networks:
app_net:
# 固定子网ip网段必须在子网络10.10.*.*
ipv4_address: 10.10.10.1
# 固定子网ip网段必须在子网络192.168.8.*
ipv4_address: 192.168.8.6
container_name: "compose-mysql"
networks:
# 配置docker network
@ -47,4 +47,4 @@ networks:
ipam:
config:
# 子网络
- subnet: 10.10.0.0/16
- subnet: 192.168.8.0/24

View File

@ -1,4 +1,4 @@
FROM php:7.2-fpm
FROM php:7.3-fpm
RUN apt-get update \
&& apt-get install iputils-ping \