加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
Freax 提交于 2017-01-06 23:10 . add google and baidu dns support
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
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}
depends_on:
- node
node:
image: node
hostname: ${NODE_HOST}
env_file:
- ./docker/node.js/node.env
- ./docker/mysql/mysql.env
- ./.env
command: node --harmony docker/nodemon/index.js
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}
ports:
- "${APP_PORT}:${APP_PORT}"
- "5858:5858"
volumes:
- .:/code
working_dir: /code
depends_on:
- mysql
- mongo
- redis
mysql:
image: mysql
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:/etc/mysql/conf.d
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}
dns:
- ${BAIDUDNS}
- ${GOOGLEDNS}
volumes:
- ./docker/mongo/data:/data/db
- ./docker/mongo/etc/mongod.conf.orig:/etc/mongod.conf.orig
- ./docker/mongo/logs/:/var/log/mongodb/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化