-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
77 lines (77 loc) · 1.97 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: '2'
services:
nginx:
image: openresty/openresty
hostname: nginx
ports:
- "${NGINX_PORT}:80"
env_file:
- ./docker/nginx/nginx.env
- ./.env
volumes:
- ./docker/nginx/logs/:/usr/local/openresty/nginx/logs
- ./docker/nginx/etc/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
- ./docker/nginx/etc/conf.d:/usr/local/openresty/nginx/conf/conf.d
- .:/code
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}
depends_on:
- php
php:
image: huangyanxiong2012/docker-php-image
hostname: ${PHP_HOST}
ports:
- "8080:8080"
#command: php react.php
env_file:
- ./docker/php/php.env
- ./docker/mysql/mysql.env
- ./.env
volumes:
- .:/code
- ./docker/php/etc/php.ini:/etc/php/7.0/fpm/php.ini
- ./docker/php/etc/php-fpm.conf:/etc/php/7.0/fpm/php-fpm.conf
- ./docker/php/etc/php-fpm.d/www.conf:/etc/php/7.0/fpm/pool.d/www.conf
- ./docker/php/logs/:/var/log/php/
working_dir: /code
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}
depends_on:
- mysql
- mongo
- redis
mysql:
image: mysql:5.7
hostname: ${DB_HOST}
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}
env_file:
- ./docker/mysql/mysql.env
volumes:
- ./docker/mysql/data/:/var/lib/mysql/
- ./docker/mysql/logs/:/var/log/mysql/
- ./docker/mysql/etc/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
redis:
image: redis
hostname: ${REDIS_HOST}
command: redis-server ${REDIS_CONF}
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}
volumes:
- ./docker/redis/data:/data
- ./docker/redis/etc/redis.conf:${REDIS_CONF}
- ./docker/redis/logs/:/var/log/redis/
mongo:
image: mongo
hostname: ${MONGO_HOST}
volumes:
- ./docker/mongo/logs/:/var/log/mongodb/
- ./docker/mongo/data:/data/db
- ./docker/mongo/etc/mongod.conf.orig:/etc/mongod.conf.orig
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}