fixed volumes

This commit is contained in:
kolaente 2017-11-26 16:42:45 +01:00
parent a8a5c2be84
commit 9783dbc89d
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 23 additions and 35 deletions

View File

@ -3,12 +3,12 @@ services:
gitea: gitea:
image: gitea/gitea:1.3.0-rc1 image: gitea/gitea:1.3.0-rc1
volumes: volumes:
- gitea-data-git:/data/git - ${data_path}/git:/data/git
- gitea-data-ssh:/data/ssh - ${data_path}/ssh:/data/ssh
- gitea-data-conf:/data/gitea/lfs - ${data_path}/gitea/conf:/data/gitea/lfs
- gitea-data-lfs:/data/gitea/lfs - ${data_path}/gitea/lfs:/data/gitea/lfs
- gitea-data-log:/data/gitea/log - ${data_path}/gitea/log:/data/gitea/log
- gitea-data-sessions:/data/gitea/sessions - ${data_path}/gitea/sessions:/data/gitea/sessions
{{- if ne .Values.db_link ""}} {{- if ne .Values.db_link ""}}
external_links: external_links:
@ -22,28 +22,10 @@ services:
MYSQL_ROOT_PASSWORD: ${mysql_password} MYSQL_ROOT_PASSWORD: ${mysql_password}
MYSQL_DATABASE: 'gitea' MYSQL_DATABASE: 'gitea'
volumes: volumes:
- gitea-db:/var/lib/mysql - ${data_path}/gitea/db:/var/lib/mysql
{{- end}} {{- end}}
lb: lb:
image: rancher/lb-service-haproxy:v0.7.9 image: rancher/lb-service-haproxy:v0.7.9
ports: ports:
- ${http_port}:${http_port}/tcp - ${http_port}:${http_port}/tcp
- ${ssh_port}:${ssh_port}/tcp - ${ssh_port}:${ssh_port}/tcp
volumes:
gitea-data-git:
driver: ${volume_driver}
gitea-data-ssh:
driver: ${volume_driver}
gitea-data-conf:
driver: ${volume_driver}
gitea-data-lfs:
driver: ${volume_driver}
gitea-data-log:
driver: ${volume_driver}
gitea-data-sessions:
driver: ${volume_driver}
{{- if eq .Values.db_link ""}}
gitea-db:
driver: ${volume_driver}
{{- end}}

View File

@ -19,17 +19,23 @@ catalog:
required: true required: true
default: "2222" default: "2222"
type: "int" type: "int"
- variable: "volume_driver" - variable: data_path
description: "Volume driver to associate with this service." description: "Path where to store the data of the Gitea-instance."
label: "Volume Driver" label: "Data path"
required: true required: true
default: "local" default: "/var/lib/gitea"
type: enum type: "string"
options: # List of options if using type of `enum` # - variable: "volume_driver"
- local # description: "Volume driver to associate with this service."
- rancher-nfs # label: "Volume Driver"
- rancher-efs # required: true
- rancher-ebs # default: "local"
# type: enum
# options: # List of options if using type of `enum`
# - local
# - rancher-nfs
# - rancher-efs
# - rancher-ebs
- variable: "db_link" - variable: "db_link"
description: "External DB service to use with gitea instead of its own DB-Container." description: "External DB service to use with gitea instead of its own DB-Container."
label: "External DB service" label: "External DB service"