forked from little-gg-bound/docker-lnmp-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (57 loc) · 1.56 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
53
54
55
56
57
58
59
version: '3.2'
services:
nginx:
image: nginx:1.13.3
ports:
- "80:80"
links:
- "php-fpm:php-fpm"
volumes:
- ./app:/app:rw
- ./dockerfiles/nginx/conf.d:/etc/nginx/conf.d:ro
- ./dockerfiles/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./logs/nginx:/var/log/nginx
- /etc/localtime:/etc/localtime:ro
restart: always
command: nginx -g 'daemon off;'
mysql-db:
image: mysql:5.7
volumes:
- ./data/mysql:/var/lib/mysql:rw
- ./logs/mysql:/var/lib/mysql-logs:rw
- ./dockerfiles/mysql/conf.d:/etc/mysql/conf.d:ro
- /etc/localtime:/etc/localtime:ro
restart: always
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: zhaojun
MYSQL_DATABASE: package_v1
MYSQL_USER: zhaojun
MYSQL_PASSWORD: zhaojun
command: "--character-set-server=utf8 --collation-server=utf8_unicode_ci"
redis-db:
build: ./dockerfiles/redis
restart: always
volumes:
- ./data/redis:/data
- /etc/localtime:/etc/localtime:ro
php-fpm:
#build: ./dockerfiles/php/
image: zhaojunlike/php-fpm:5.6-latest
restart: always
environment:
TP_APP_DEBUG: 1
APP_DEBUG: 1
volumes:
- ./app:/app:rw
- ./dockerfiles/php/php-dev.ini:/usr/local/etc/php/php.ini:ro
- ./dockerfiles/php/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
- /etc/localtime:/etc/localtime:ro
- ./logs/php-fpm:/var/log/php-fpm:rw
links:
- mysql-db:mysql-db
- redis-db:redis-db
command: php-fpm
ports:
- "9000:9000"