-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (36 loc) · 840 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (36 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: '3'
services:
nginx:
build: ./nginx
container_name: nginx
depends_on:
- php
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/logs:/etc/nginx/logs
- ./www:/data/www
networks:
- net-php
php:
build:
context: ./php
args:
- PHP_VERSION=7.2.18 # 指定 PHP 版本
container_name: php
working_dir: /data/www
ports:
- "9000:9000"
volumes:
- ./php/php.ini:/usr/local/etc/php/php.ini
- ./php/php-fpm.conf:/usr/local/etc/php-fpm.conf
- ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./php/conf.d:/usr/local/etc/php/conf.d
- ./php/logs:/usr/local/var/log
- ./www:/data/www
networks:
- net-php
networks:
net-php: