forked from gtsigner/docker-lnmp-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-production.yml
58 lines (57 loc) · 1.58 KB
/
docker-production.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
version: '3.0'
services:
nginx:
image: nginx:1.13.3
ports:
- "80:80"
- "443:443"
links:
- "php-fpm"
volumes:
- ./app:/app:rw
- ./dockerfiles/nginx/conf.d:/etc/nginx/conf.d:ro
- ./dockerfiles/nginx/certs:/etc/nginx/certs:ro
- ./dockerfiles/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./logs/nginx:/var/log/nginx:rw
- /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
environment:
MYSQL_ROOT_PASSWORD: zhaojun
MYSQL_DATABASE: lottery_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:
- /etc/localtime:/etc/localtime:ro
- ./data/redis:/data
php-fpm:
image: zhaojunlike/php-fpm:5.6-latest
restart: always
environment:
DEV_APP_DEBUG: 0
APP_DEBUG: 0
APP_TRACE: 0
volumes:
- ./app:/app:rw
- /etc/localtime:/etc/localtime:ro
- ./dockerfiles/php/php-pro.ini:/usr/local/etc/php/php.ini:ro
- ./dockerfiles/php/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
- ./logs/php-fpm:/var/log/php-fpm:rw
links:
- mysql-db:mysql-db
- redis-db:redis-db
command: php-fpm
volumes:
app-data: