From 18164d175e38ea6383462b2eb870c82d21f84f2c Mon Sep 17 00:00:00 2001
From: Nemo <me@captnemo.in>
Date: Sat, 12 Jan 2019 15:16:50 +0530
Subject: [PATCH] Disable LFS server because 1.7 breaks:

https://github.com/go-gitea/gitea/issues/5704
---
 gitea/data.tf           |  2 +-
 gitea/main.tf           | 15 ++++++++++++++-
 gitea/conf/conf.ini.tpl |  2 +-
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/gitea/data.tf b/gitea/data.tf
index 9010227..0c83dc3 100644
--- a/gitea/data.tf
+++ a/gitea/data.tf
@@ -1,6 +1,6 @@
 # https://github.com/go-gitea/gitea/releases
 data "docker_registry_image" "gitea" {
-  name = "gitea/gitea:1.6.1"
+  name = "gitea/gitea:1.7"
 }
 
 data "docker_registry_image" "redis" {
diff --git a/gitea/main.tf b/gitea/main.tf
index ddc8ecf..2c8e06f 100644
--- a/gitea/main.tf
+++ a/gitea/main.tf
@@ -38,8 +38,9 @@
     file    = "/data/gitea/public/img/gitea-sm.png"
   }
   upload {
-    content = "${file("${path.module}/conf/public/img/gitea-sm.png")}"
-    file    = "/data/gitea/public/img/favicon.png"
+    content    = "${file("${path.module}/conf/public/img/gitea-sm.png")}"
+    file       = "/data/gitea/public/img/favicon.png"
+    executable = false
   }
   upload {
     content = "${file("${path.module}/../docker/conf/humans.txt")}"
@@ -60,6 +61,16 @@
   destroy_grace_seconds = 10
   must_run              = true
   networks              = ["${docker_network.gitea.id}", "${var.traefik-network-id}"]
+
+  # This doesn't work.
+  # See https://github.com/terraform-providers/terraform-provider-docker/issues/48
+  # lifecycle {
+  #   ignore_changes = [
+  #     "upload.2151376053.content",
+  #     "upload.2151376053.executable",
+  #     "upload.2151376053.file",
+  #   ]
+  # }
 }
 
 resource "docker_image" "gitea" {
diff --git a/gitea/conf/conf.ini.tpl b/gitea/conf/conf.ini.tpl
index 56ba9ac..6283a85 100644
--- a/gitea/conf/conf.ini.tpl
+++ a/gitea/conf/conf.ini.tpl
@@ -67,7 +67,7 @@
 DISABLE_SSH      = false
 SSH_PORT         = 22
 DOMAIN           = git.captnemo.in
-LFS_START_SERVER = true
+LFS_START_SERVER = false
 LFS_CONTENT_PATH = /data/gitea/lfs
 LFS_JWT_SECRET   = ${lfs-jwt-secret}
 OFFLINE_MODE     = true
--
rgit 0.1.5