From 42a264c7bd92e1ef2b06a9af1edd8da03b004e53 Mon Sep 17 00:00:00 2001
From: Nemo <commits@captnemo.in>
Date: Tue, 02 Feb 2021 18:31:56 +0530
Subject: [PATCH] Disable SSH, upgrade gitea

---
 gitea/data.tf           |  2 +-
 gitea/main.tf           | 16 +++-------------
 gitea/conf/conf.ini.tpl |  9 ++++-----
 3 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/gitea/data.tf b/gitea/data.tf
index a09350f..0ab3a73 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.12"
+  name = "gitea/gitea:1.13"
 }
 
 data "docker_registry_image" "redis" {
diff --git a/gitea/main.tf b/gitea/main.tf
index 56cd107..e25358c 100644
--- a/gitea/main.tf
+++ a/gitea/main.tf
@@ -5,21 +5,9 @@
   labels = "${merge(
     var.traefik-labels, map(
       "traefik.port", 3000,
-      "traefik.frontend.rule","Host:${var.domain}"
+      "traefik.frontend.rule", "Host:${var.domain}"
   ))}"
 
-  ports {
-    internal = 22
-    external = 2222
-    ip       = "${var.ips["eth0"]}"
-  }
-
-  ports {
-    internal = 22
-    external = 2222
-    ip       = "${var.ips["tun0"]}"
-  }
-
   volumes {
     volume_name    = "${docker_volume.gitea_volume.name}"
     container_path = "/data"
@@ -60,7 +48,7 @@
     content = "${data.template_file.gitea-config-file.rendered}"
     file    = "/data/gitea/conf/app.ini"
   }
-  memory                = 256
+  memory                = 512
   restart               = "always"
   destroy_grace_seconds = 10
   must_run              = true
diff --git a/gitea/conf/conf.ini.tpl b/gitea/conf/conf.ini.tpl
index 620bebb..bbddece 100644
--- a/gitea/conf/conf.ini.tpl
+++ a/gitea/conf/conf.ini.tpl
@@ -11,7 +11,7 @@
 
 [repository]
 ROOT = /data/git/repositories
-USE_COMPAT_SSH_URI = true
+USE_COMPAT_SSH_URI = false
 
 [repository.upload]
 TEMP_PATH = /data/gitea/uploads
@@ -62,11 +62,9 @@
 
 [server]
 APP_DATA_PATH    = /data/gitea
-SSH_DOMAIN       = code.captnemo.in
 HTTP_PORT        = 3000
 ROOT_URL         = https://git.captnemo.in/
-DISABLE_SSH      = false
-SSH_PORT         = 22
+DISABLE_SSH      = true
 DOMAIN           = git.captnemo.in
 LFS_START_SERVER = true
 LFS_CONTENT_PATH = /data/gitea/lfs
@@ -212,14 +210,13 @@
 MAX_FILES = 10
 
 [log]
-ROOT_PATH =
 ; Either "console", "file", "conn", "smtp" or "database", default is "console"
 ; Use comma to separate multiple modes, e.g. "console, file"
 MODE = console
 ; Buffer length of the channel, keep it as it is if you don't know what it is.
 BUFFER_LEN = 10000
 ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
-LEVEL = Critical
+LEVEL = Trace
 REDIRECT_MACARON_LOG = true
 ROUTER_LOG_LEVEL = Critical
 ENABLE_ACCESS_LOG = true
--
rgit 0.1.5