-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (39 loc) · 822 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (39 loc) · 822 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
37
38
39
40
41
42
43
version: '3.5'
services:
nginx:
image: nginx:latest
# 端口映射
ports:
- "80:80"
# 依赖关系 先跑php
privileged: true
depends_on:
- "php"
- "php8"
# 数据卷
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/logs:/var/log/nginx
- ${WORK_DIR}:/var/www/html
# 容器名称
container_name: "work-nginx"
restart: always
php:
build: ./php/7.2
volumes:
- ${WORK_DIR}:/var/www/html
ports:
- 9000:9000
image: work_php_7.2
container_name: "work-php7.2"
restart: always
php8:
build: ./php/8
volumes:
- ${WORK_DIR}:/var/www/html
ports:
- 9011:9000
image: work_php_8
container_name: "work-php8"
restart: always