-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.example.yml
48 lines (44 loc) · 1 KB
/
docker-compose.example.yml
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
44
45
46
47
48
version: '3'
services:
nginx:
image: nginx:1.14
container_name: nginx
volumes:
- ./code/:/var/www/code
- ./code/project:/var/www/code/project # 项目映射目录
- ./logs/:/var/log/nginx
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/conf/conf.d/:/etc/nginx/conf.d
- ./nginx/conf/ssl/:/etc/nginx/ssl
ports:
- "81:81"
- "80:80"
- "443:443"
depends_on:
- php-fpm
php-fpm:
build:
context: ./php-fpm
container_name: php-fpm
volumes:
- ./code/:/var/www/code
- ./code/project:/var/www/code/project
- ./supervisor:/etc/supervisor/conf.d
ports:
- "5200:5200"
depends_on:
- cache
cache:
image: redis:5.0
container_name: cache
ports:
- "6379:6379"
database:
build:
context: ./database
environment:
- MYSQL_DATABASE=mydb
- MYSQL_USER=myuser
- MYSQL_PASSWORD=secret
- MYSQL_ROOT_PASSWORD=docker
- TZ=Asia/Shanghai