Skip to content

Commit aed8792

Browse files
committed
add google and baidu dns support
1 parent 2d36c09 commit aed8792

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

.env

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ APP_PORT=3030
99
NGINX_PORT=3000
1010

1111
##Specifies the redis configuration file
12-
REDIS_CONF=/usr/local/etc/redis/redis.conf
12+
REDIS_CONF=/usr/local/etc/redis/redis.conf
13+
14+
15+
BAIDUDNS=180.76.76.76
16+
GOOGLEDNS=8.8.8.8

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ services:
1212
- ./docker/nginx/logs/:/usr/local/openresty/nginx/logs
1313
- ./docker/nginx/etc/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
1414
- ./docker/nginx/etc/conf.d:/usr/local/openresty/nginx/conf/conf.d
15+
dns:
16+
- ${BAIDUDNS}
17+
- ${GOOGLEDNS}
1518
depends_on:
1619
- node
1720
node:
@@ -22,6 +25,9 @@ services:
2225
- ./docker/mysql/mysql.env
2326
- ./.env
2427
command: node --harmony docker/nodemon/index.js
28+
dns:
29+
- ${BAIDUDNS}
30+
- ${GOOGLEDNS}
2531
ports:
2632
- "${APP_PORT}:${APP_PORT}"
2733
- "5858:5858"
@@ -35,6 +41,9 @@ services:
3541
mysql:
3642
image: mysql
3743
hostname: ${DB_HOST}
44+
dns:
45+
- ${BAIDUDNS}
46+
- ${GOOGLEDNS}
3847
env_file:
3948
- ./docker/mysql/mysql.env
4049
volumes:
@@ -46,13 +55,19 @@ services:
4655
image: redis
4756
hostname: ${REDIS_HOST}
4857
command: redis-server ${REDIS_CONF}
58+
dns:
59+
- ${BAIDUDNS}
60+
- ${GOOGLEDNS}
4961
volumes:
5062
- ./docker/redis/data:/data
5163
- ./docker/redis/etc/redis.conf:${REDIS_CONF}
5264
- ./docker/redis/logs/:/var/log/redis/
5365
mongo:
5466
image: mongo
5567
hostname: ${MONGO_HOST}
68+
dns:
69+
- ${BAIDUDNS}
70+
- ${GOOGLEDNS}
5671
volumes:
5772
- ./docker/mongo/data:/data/db
5873
- ./docker/mongo/etc/mongod.conf.orig:/etc/mongod.conf.orig

0 commit comments

Comments
 (0)