提交 cfb529c5 作者: 施泽锋

11

上级 e135a2e9
{{- $autodeolpyImage:=printf "%s/auto_deploy:1.0.12" .Values.docker_registry}}
{{- $dbImage:=printf "%s/mysql:5.7" .Values.docker_registry}}
{{- $mqSImage:=printf "%s/rabbitmq:3.6.16-management-alpine" .Values.docker_registry}}
{{ define "infoenv" }}
- REDIS_HOST=${redis_host}
- REDIS_PASSWORD=${redis_pwd}
- REDIS_PORT=6379
- MQ_USER=${mq_user}
- MQ_PASSWORD=${mq_pass}
- MQ_HOST=${mq_host}
- MQ_PORT=5672
- MQ_VHOST=${mq_vhost}
- DB_HOST=${db_host}
- DB_USER=${db_user}
- DB_PORT=3306
- DB_PWD=${db_pwd}
{{ end }}
version: '2'
volumes:
auto-mysql:
driver: ${volume_driver}
migrations:
driver: ${volume_driver}
services:
auto-deploy:
image: {{$autodeolpyImage}}
environment:
{{ template "infoenv" .}}
- COLUMNS=80
- LANG=C.UTF-8
stdin_open: true
tty: true
logging:
driver: json-file
options:
max-size: 100m
max-file: '3'
volumes:
- migrations:/opt/lovexishi/xishi/deploy/migrations
labels:
traefik.web.frontend.rule: Host:${web_url}
traefik.enable: 'true'
traefik.web.port: '80'
io.rancher.container.pull_image: always
auto-redis:
image: registry.cn-shenzhen.aliyuncs.com/wsy_dev/redis:4.0.11
environment:
- REDIS_PASSWORD=${redis_pwd}
stdin_open: true
tty: true
logging:
driver: json-file
options:
max-size: 100m
max-file: '3'
labels:
io.rancher.container.pull_image: always
auto-db:
image: {{$dbImage}}
environment:
- MYSQL_ROOT_PASSWORD=${db_pwd}
- LANG=C.UTF-8
- MY_CNF=[mysqld]\nmax_allowed_packet =30M
stdin_open: true
volumes:
- auto-mysql:/var/lib/mysql
tty: true
logging:
driver: json-file
options:
max-size: 100m
max-file: '3'
labels:
io.rancher.container.pull_image: always
auto-mq-server:
image: {{$mqSImage}}
environment:
- RABBITMQ_DEFAULT_USER=${mq_user}
- RABBITMQ_DEFAULT_PASS=${mq_pass}
- RABBITMQ_DEFAULT_VHOST=${mq_vhost}
stdin_open: true
tty: true
logging:
driver: json-file
options:
max-size: 100m
max-file: '3'
labels:
io.rancher.container.pull_image: always
version: '2'
catalog:
name: "Auto_deploy | 自动部署工具"
version: "v1.0.12"
description: "偷懒用工具。"
minimum_rancher_version: v0.51.0
questions:
- variable: web_url
description: "Domain"
label: "域名"
required: true
default: ""
type: "string"
- variable: db_host
description: "数据库连接地址,应用内可直接使用服务名"
label: "数据库连接地址"
required: true
default: "auto-db"
type: "string"
- variable: db_user
description: "数据库账号,首次运行会自动创建"
label: "数据库账号"
required: true
default: "root"
type: "string"
- variable: db_pwd
description: "数据库密码,首次运行会自动创建"
label: "数据库密码"
required: true
default: ""
type: "string"
- variable: redis_host
description: "redis数据库连接地址"
label: "redis数据库连接地址"
required: true
default: "auto-redis"
type: "string"
- variable: redis_pwd
description: "redis数据库密码"
label: "redis数据库密码"
required: true
default: ""
type: "string"
- variable: mq_host
description: "消息队列服务器地址,应用内可直接使用服务名"
label: "消息队列服务器地址"
required: true
default: "auto-mq-server"
type: "string"
- variable: mq_vhost
description: "消息队列虚拟主机名"
label: "消息队列虚拟主机"
required: true
default: "my_vhost"
type: "string"
- variable: mq_user
description: "消息队列账号"
label: "消息队列账号"
required: true
default: "mquser"
type: "string"
- variable: mq_pass
description: "消息队列密码"
label: "消息队列密码"
required: true
default: ""
type: "string"
- variable: volume_driver
description: "应用数据卷驱动程序"
label: "卷驱动"
required: true
default: "local"
type: enum
options:
- rancher-nfs
- local
- variable: debug_mode
description: "debug模式,生产环境慎用!"
label: "debug模式"
required: true
default: "false"
type: enum
options:
- true
- false
- variable: docker_registry
description: "仓库加速节点"
label: "仓库地址"
required: true
default: "reg.wsy010.cn/auto_deploy"
type: enum
options:
- reg.wsy010.cn/auto_deploy
services:
auto-redis:
scale: 1
start_on_create: true
auto-db:
scale: 1
start_on_create: true
\ No newline at end of file
name: Auto_deploy | 自动部署工具 name: Auto_deploy | 自动部署工具
description: | description: |
随便写的,能用就行了。 随便写的,能用就行了。
version: v1.0.7 version: v1.0.12
category: CMS category: CMS
maintainer: xishi maintainer: xishi
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论