docker-compose.yml
version: "3.7"
networks:
ah:
services:
php_80:
build:
context: ..
dockerfile: dockerfile/php80
container_name: php80
volumes:
- D:\tools\phpstudy\WWW:/www/wwwroot
- ./config/php80/php.ini:/usr/local/etc/php/php.ini
networks:
- ah
php_81:
build:
context: ..
dockerfile: dockerfile/php81
container_name: php81
volumes:
- D:\tools\phpstudy\WWW:/www/wwwroot
- ./config/php81/php.ini:/usr/local/etc/php/php.ini
networks:
- ah
redis_70:
build:
context: ..
dockerfile: dockerfile/redis70
container_name: redis
command:
- sh
- -c
- |
redis-server /redis.conf
sysctl vm.overcommit_memory=1
volumes:
- ./data/redis:/data
- ./config/redis/redis.conf:/redis.conf
ports:
- "6379:6379"
networks:
- ah
nginx_117:
build:
context: ..
dockerfile: dockerfile/nginx117
container_name: nginx
ports:
- "80:80"
volumes:
- D:\tools\phpstudy\WWW:/www/wwwroot
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./config/nginx/vhosts:/etc/nginx/vhosts
- ./log/nginx:/var/log/nignx
depends_on:
- php_80
- php_81
networks:
- ah
推荐文章: