提交 fbb9adbc 作者: 施泽锋

1

上级 3d13a0b6
...@@ -29,6 +29,13 @@ services: ...@@ -29,6 +29,13 @@ services:
SYSTEM_API_KEY: ${sys_api_key} SYSTEM_API_KEY: ${sys_api_key}
DEBUG: ${debug_mode} DEBUG: ${debug_mode}
INIT_DB: ${init_db_enable} INIT_DB: ${init_db_enable}
{{- if eq .Values.db_host "db-mysql" }}
depends_on:
- db-mysql
{{- if eq .Values.redis_host "redis" }}
- redis
{{- end }}
{{- end }}
volumes: volumes:
- resources:/var/www/html/resources - resources:/var/www/html/resources
- /tmp/wsy - /tmp/wsy
...@@ -42,6 +49,7 @@ services: ...@@ -42,6 +49,7 @@ services:
traefik.port: '80' traefik.port: '80'
traefik.enable: 'true' traefik.enable: 'true'
io.rancher.container.pull_image: always io.rancher.container.pull_image: always
{{- if eq .Values.db_host "db-mysql" }}
db-mysql: db-mysql:
image: {{$dbImage}} image: {{$dbImage}}
environment: environment:
...@@ -54,6 +62,8 @@ services: ...@@ -54,6 +62,8 @@ services:
tty: true tty: true
labels: labels:
io.rancher.container.pull_image: always io.rancher.container.pull_image: always
{{- end }}
{{- if eq .Values.redis_host "redis" }}
redis: redis:
image: {{$redisImage}} image: {{$redisImage}}
environment: environment:
...@@ -62,8 +72,11 @@ services: ...@@ -62,8 +72,11 @@ services:
tty: true tty: true
labels: labels:
io.rancher.container.pull_image: always io.rancher.container.pull_image: always
{{- end }}
volumes: volumes:
{{- if eq .Values.db_host "db-mysql" }}
db-mysql: db-mysql:
driver: ${volume_driver} driver: ${volume_driver}
{{- end }}
resources: resources:
driver: ${volume_driver} driver: ${volume_driver}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论