1 Star 0 Fork 4

1569501393/docker

forked from 后盾人/docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yaml 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
后盾人 提交于 2020-01-25 05:17 . 项目目录更名为www
version: "3.3"
services:
nginx:
#DOCKFILE文件所在目录
build: ./nginx
#设置生成的镜像名
image: houdunren/nginx
#容器名称
container_name: "${CONTAINER_NAME_PRE}-nginx"
#DOCKER进程重起时重起容器
restart: always
#端口映射
ports:
- "${PORT}:80"
#容器依赖
depends_on:
- php
#目录映射
volumes:
- ./nginx/config:/etc/nginx/conf.d
- ./nginx/log:/var/log/nginx
- ./www:/www
php:
build: ./php
image: houdunren/php
container_name: "${CONTAINER_NAME_PRE}-php"
restart: always
volumes:
- ./www:/www
depends_on:
- mysql
redis:
build: ./redis
image: houdunren/redis
container_name: "${CONTAINER_NAME_PRE}-redis"
restart: always
volumes:
- ./redis/data:/data
- ./redis/config/redis.conf:/usr/local/etc/redis/redis.conf
mysql:
build: ./mysql
image: houdunren/mysql
container_name: "${CONTAINER_NAME_PRE}-mysql"
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ONETIME_PASSWORD=${MYSQL_ONETIME_PASSWORD}
ports:
- "${MYSQL_PORT}:3306"
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/log:/var/log/mysql
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Docker
1
https://gitee.com/jieqiang/docker.git
git@gitee.com:jieqiang/docker.git
jieqiang
docker
docker
master

搜索帮助