refactor: 目录重构为 top/image(自建镜像)与 top/app(部署编排)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
version: '3.8'
|
||||
|
||||
# 网桥 -> 方便相互通讯
|
||||
networks:
|
||||
tengine:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: "172.25.0.0/24"
|
||||
|
||||
services:
|
||||
tengine:
|
||||
image: registry.cn-shanghai.aliyuncs.com/odboy/kenaito:proxy-tengine3 # 镜像由 build.sh 构建
|
||||
container_name: tengine # 容器名为'tengine'
|
||||
restart: unless-stopped
|
||||
ports: # 映射端口
|
||||
- "80:80" # http
|
||||
- "443:443" # https
|
||||
#- "8080:80" # 与其它 web 服务在同一台机器时改用此映射
|
||||
volumes: # 数据卷挂载路径设置,将本机目录映射到容器目录
|
||||
# 只挂载目录,不要单文件挂载 nginx.conf:单文件挂载在宿主机上编辑会触发 inode 变化,容器内看不到修改
|
||||
- "./nginx/conf.d:/usr/local/nginx/conf/conf.d"
|
||||
- "./nginx/ssl:/usr/local/nginx/conf/ssl"
|
||||
- "./nginx/html:/usr/local/nginx/html"
|
||||
- "./nginx/logs:/usr/local/nginx/logs"
|
||||
environment: # 设置环境变量,相当于docker run命令中的-e
|
||||
TZ: Asia/Shanghai
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "netstat -tln | grep -q ':80 ' && netstat -tln | grep -q ':443 '"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
networks:
|
||||
tengine:
|
||||
ipv4_address: 172.25.0.20
|
||||
Reference in New Issue
Block a user