-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathdocker-compose.yml
52 lines (52 loc) · 1.29 KB
/
docker-compose.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
49
50
51
52
version: "2"
services:
mydb:
image: mysql:5.7
container_name: "mydb"
restart: always
ports:
- "3306:3306"
volumes:
- ./../../server/mysql/conf:/etc/mysql
- ./../../server/mysql/data:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
MYSQL_ROOT_PASSWORD: 123456
myredis:
image: redis:3.2
container_name: "myredis"
restart: always
ports:
- "6379:6379"
volumes:
- ./../../server/redis:/data
- /etc/localtime:/etc/localtime:ro
myphp:
image: php:7.2-fpm
container_name: "myphp"
restart: always
ports:
- "9000:9000"
volumes:
- ./../../server/www:/var/www/html
- ./../../server/php/php.ini:/usr/local/etc/php/php.ini
- ./../../server/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
- ./../../server/php/php-fpm.d:/usr/local/etc/php-fpm.d
- /etc/localtime:/etc/localtime:ro
links:
- "mydb"
- "myredis"
mynginx:
image: nginx:latest
container_name: "mynginx"
restart: always
ports:
- "80:80"
- "443:443"
links:
- "myphp"
volumes:
- ./../../server/www:/usr/share/nginx/html
- ./../../server/nginx:/etc/nginx
- ./../../server/logs/nginx.logs:/var/log/nginx
- /etc/localtime:/etc/localtime:ro