diff --git a/templates/gitea/0/docker-compose.yml.tpl b/templates/gitea/0/docker-compose.yml.tpl index 0ae675e..2f0a71c 100644 --- a/templates/gitea/0/docker-compose.yml.tpl +++ b/templates/gitea/0/docker-compose.yml.tpl @@ -3,12 +3,12 @@ services: gitea: image: gitea/gitea:1.3.0-rc1 volumes: - - ${data_path}/git:/data/git - - ${data_path}/ssh:/data/ssh - - ${data_path}/gitea/conf:/data/gitea/conf - - ${data_path}/gitea/lfs:/data/gitea/lfs - - ${data_path}/gitea/log:/data/gitea/log - - ${data_path}/gitea/sessions:/data/gitea/sessions + - gitea-data-git:/data/git + - gitea-data-ssh:/data/ssh + - gitea-data-conf:/data/gitea/conf + - gitea-data-lfs:/data/gitea/lfs + - gitea-data-log:/data/gitea/log + - gitea-data-sessions:/data/gitea/sessions {{- if ne .Values.db_link ""}} external_links: @@ -22,10 +22,28 @@ services: MYSQL_ROOT_PASSWORD: ${mysql_password} MYSQL_DATABASE: 'gitea' volumes: - - ${data_path}/gitea/db:/var/lib/mysql + - gitea-db:/var/lib/mysql {{- end}} lb: image: rancher/lb-service-haproxy:v0.7.9 ports: - ${http_port}:${http_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}} + diff --git a/templates/gitea/0/rancher-compose.yml b/templates/gitea/0/rancher-compose.yml index c1d83b0..475a32f 100644 --- a/templates/gitea/0/rancher-compose.yml +++ b/templates/gitea/0/rancher-compose.yml @@ -19,23 +19,23 @@ catalog: required: true default: "2222" type: "int" - - variable: data_path - description: "Path where to store the data of the Gitea-instance." - label: "Data path" - required: true - default: "/var/lib/gitea" - type: "string" -# - variable: "volume_driver" -# description: "Volume driver to associate with this service." -# label: "Volume Driver" +# - variable: data_path +# description: "Path where to store the data of the Gitea-instance." +# label: "Data path" # required: true -# default: "local" -# type: enum -# options: # List of options if using type of `enum` -# - local -# - rancher-nfs -# - rancher-efs -# - rancher-ebs +# default: "/var/lib/gitea" +# type: "string" + - variable: "volume_driver" + description: "Volume driver to associate with this service." + label: "Volume Driver" + required: true + default: "local" + type: enum + options: # List of options if using type of `enum` + - local + - rancher-nfs + - rancher-efs + - rancher-ebs - variable: "db_link" description: "External DB service to use with gitea instead of its own DB-Container." label: "External DB service"