🏡 index : github.com/captn3m0/nebula.git

author Nemo <commits@captnemo.in> 2023-06-01 14:00:49.0 +05:30:00
committer Nemo <commits@captnemo.in> 2023-06-01 14:01:06.0 +05:30:00
commit
9b79cab3afefb2fe6e71aea0470f2fc921ddfea5 [patch]
tree
efaade28d33196e53feb76ef4ba5f4d8ad97a66f
parent
5bd44d411f8b51116aec2b553f84bf9a29bb5fe0
download
9b79cab3afefb2fe6e71aea0470f2fc921ddfea5.tar.gz

gitea upgrade and fixes

fixes the svg favicons, but these are not nice

Diff

 gitea/data.tf                     |  2 +-
 gitea/main.tf                     | 29 ++++++++++++++++++++++++++---
 gitea/conf/conf.ini.tpl           | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 gitea/conf/robots.txt             |  2 ++
 gitea/conf/public/robots.txt      |  2 ++
 gitea/conf/public/img/favicon.svg | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 129 insertions(+), 10 deletions(-)

diff --git a/gitea/data.tf b/gitea/data.tf
index de0ddcb..18314d4 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.17"
  name = "gitea/gitea:1.19"
}

data "docker_registry_image" "redis" {

diff --git a/gitea/main.tf b/gitea/main.tf
index ce643f5..08f3d7e 100644
--- a/gitea/main.tf
+++ a/gitea/main.tf
@@ -23,29 +23,44 @@
    host_path      = docker_volume.gitea_volume.mountpoint
  }

  # For the following uploads, note that
  # /data/gitea is GITEA_CUSTOM_PATH

  # Logos
  # TODO: Add svg

  # https://docs.gitea.com/next/administration/customizing-gitea#changing-the-logo
  # PNG images
  upload {

    content_base64 = filebase64("${path.module}/conf/public/img/gitea-lg.png")
    file           = "/data/gitea/public/img/gitea-lg.png"
    file           = "/data/gitea/public/img/logo.png"
  }
  upload {

    content_base64 = filebase64("${path.module}/conf/public/img/gitea-sm.png")
    file           = "/data/gitea/public/img/gitea-sm.png"
    content_base64 = filebase64("${path.module}/conf/public/img/gitea-lg.png")
    file           = "/data/gitea/public/img/apple-touch-icon.png"
  }
  upload {

    content_base64 = filebase64("${path.module}/conf/public/img/gitea-sm.png")
    file           = "/data/gitea/public/img/favicon.png"
    executable     = false
  }

  # SVG images
  upload {

    content_base64 = filebase64("${path.module}/conf/public/img/favicon.svg")
    file           = "/data/gitea/public/img/logo.svg"
  }
  upload {

    content_base64 = filebase64("${path.module}/conf/public/img/favicon.svg")
    file           = "/data/gitea/public/img/favicon.svg"
  }

  # Some files at top-level
  upload {

    content = file("${path.module}/../docker/conf/humans.txt")
    file    = "/data/gitea/public/humans.txt"
    file    = "/data/gitea/humans.txt"
  }
  upload {

    content = file("${path.module}/conf/public/robots.txt")
    file    = "/data/gitea/public/robots.txt"
    file    = "/data/gitea/robots.txt"
  }

  # Extra Links in header
diff --git a/gitea/conf/conf.ini.tpl b/gitea/conf/conf.ini.tpl
index 5cc7f0a..a7bdc3a 100644
--- a/gitea/conf/conf.ini.tpl
+++ a/gitea/conf/conf.ini.tpl
@@ -1,8 +1,8 @@
; This file lists the default values used by Gitea
; Copy required sections to your own app.ini (default is custom/conf/app.ini)
; and modify as needed.
; See the cheatsheet at https://docs.gitea.io/en-us/config-cheat-sheet/
; A sample file with all configuration documented is at https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample
; A sample file with all configuration documented is at https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini

; App name that shows on every page title
APP_NAME = Nemo's code
@@ -17,6 +17,10 @@
TEMP_PATH = /data/gitea/uploads

[ui]

;; Number of issues that are displayed on one page
ISSUE_PAGING_NUM = 20

; Value of `theme-color` meta tag, used by Android >= 5.0
; An invalid color like "none" or "disable" will have the default style
; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
@@ -35,6 +39,11 @@
NOTICE_PAGING_NUM = 25
; Number of organization that are showed in one page
ORG_PAGING_NUM = 50

;; Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.
;; A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic).

ONLY_SHOW_RELEVANT_REPOS = true

[ui.user]
; Number of repos that are showed in one page
@@ -53,6 +62,9 @@
CUSTOM_URL_SCHEMES = git,magnet,steam,irc,slack
FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd

;; Enables math inline and block detection
ENABLE_MATH = true

; Define allowed algorithms and their minimum key length (use -1 to disable a type)
[ssh.minimum_key_sizes]
ED25519 = 256
@@ -99,6 +111,7 @@
; ITERATE_BUFFER_SIZE = 50
; Show the database generated SQL
LOG_SQL = false
SQLITE_JOURNAL_MODE = WAL

[picture]
AVATAR_UPLOAD_PATH      = /data/gitea/avatars
@@ -164,7 +177,9 @@
FROM = git@captnemo.in
USER = git@captnemo.in
PASSWD = ${smtp_password}
HOST = smtp.migadu.com:587
PROTOCOL = smtps
SMTP_ADDR = smtp.migadu.com
SMTP_PORT = 465
SEND_AS_PLAIN_TEXT = true
SUBJECT_PREFIX = "[git.captnemo.in] "

@@ -182,7 +197,12 @@
COOKIE_SECURE = true
; SameSite settings. Either "none", "lax", or "strict"
SAME_SITE = strict

[migrations]
ALLOWED_DOMAINS = github.com
ALLOW_LOCALNETWORKS = false


[attachment]
; ; Whether attachments are enabled. Defaults to `true`
ENABLE = true
@@ -262,3 +282,27 @@

[federation]
ENABLED=false
;; Enable/Disable user statistics for nodeinfo if federation is enabled
;SHARE_USER_STATISTICS = true
;;
;; Maximum federation request and response size (MB)
;MAX_SIZE = 4
;;
;; WARNING: Changing the settings below can break federation.
;;
;; HTTP signature algorithms
;ALGORITHMS = rsa-sha256, rsa-sha512, ed25519
;;
;; HTTP signature digest algorithm
;DIGEST_ALGORITHM = SHA-256
;;
;; GET headers for federation requests
;GET_HEADERS = (request-target), Date
;;
;; POST headers for federation requests
;POST_HEADERS = (request-target), Date, Digest


[packages]
;; Enable/Disable package registry capabilities
ENABLED = true
diff --git a/gitea/conf/robots.txt b/gitea/conf/robots.txt
index ae35f66..608cea2 100644
--- a/gitea/conf/robots.txt
+++ a/gitea/conf/robots.txt
@@ -18,3 +18,5 @@
Disallow: /
User-agent: Xenu’s Link Sleuth 1.1c
Disallow: /
User-agent: AhrefsBot
Disallow: /
diff --git a/gitea/conf/public/robots.txt b/gitea/conf/public/robots.txt
index ae35f66..608cea2 100644
--- a/gitea/conf/public/robots.txt
+++ a/gitea/conf/public/robots.txt
@@ -18,3 +18,5 @@
Disallow: /
User-agent: Xenu’s Link Sleuth 1.1c
Disallow: /
User-agent: AhrefsBot
Disallow: /
diff --git a/gitea/conf/public/img/favicon.svg b/gitea/conf/public/img/favicon.svg
new file mode 100644
index 0000000..ae76976 100644
--- /dev/null
+++ a/gitea/conf/public/img/favicon.svg
@@ -1,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg

   version="1.0"
   width="2000.000000pt"
   height="2000.000000pt"
   viewBox="0 0 2000.000000 2000.000000"
   preserveAspectRatio="xMidYMid meet"
   id="svg10"
   sodipodi:docname="favicon.svg"
   inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:svg="http://www.w3.org/2000/svg">
  <defs

     id="defs14" />
  <sodipodi:namedview

     id="namedview12"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:showpageshadow="2"
     inkscape:pageopacity="0.0"
     inkscape:pagecheckerboard="0"
     inkscape:deskcolor="#d1d1d1"
     inkscape:document-units="pt"
     showgrid="false"
     inkscape:zoom="0.23281491"
     inkscape:cx="1232.7389"
     inkscape:cy="1415.2874"
     inkscape:window-width="1920"
     inkscape:window-height="1037"
     inkscape:window-x="0"
     inkscape:window-y="18"
     inkscape:window-maximized="1"
     inkscape:current-layer="g8" />
  <metadata

     id="metadata2">
Created by potrace 1.16, written by Peter Selinger 2001-2019
</metadata>
  <g

     transform="translate(0.000000,2000.000000) scale(0.100000,-0.100000)"
     fill="#000000"
     stroke="none"
     id="g8"
     style="fill:#000080">
    <path

       d="M0 10000 l0 -10000 10000 0 10000 0 0 10000 0 10000 -10000 0 -10000 0 0 -10000z m11852 5356 c553 -141 882 -698 738 -1251 -27 -102 -104 -261 -168 -346 -71 -94 -197 -207 -296 -265 -109 -65 -274 -121 -405 -136 l-100 -12 -90 -221 c-69 -169 -87 -222 -76 -227 12 -7 1420 -613 2145 -923 162 -69 310 -132 328 -140 31 -14 32 -16 20 -44 -7 -15 -55 -127 -107 -247 -52 -121 -96 -221 -98 -223 -4 -5 -131 48 -1385 585 -608 261 -1111 474 -1116 474 -5 0 -19 -24 -31 -52 -76 -181 -1440 -3576 -1474 -3667 -16 -43 -21 -81 -21 -166 -1 -99 2 -116 26 -167 38 -81 83 -133 158 -182 160 -104 244 -120 614 -113 383 7 564 38 731 125 90 47 218 173 263 258 67 128 79 306 32 471 -11 40 -20 75 -20 78 0 3 91 5 203 5 402 0 680 43 1017 156 226 76 540 218 768 348 35 20 66 36 68 36 9 0 3 -122 -11 -237 -57 -462 -214 -845 -470 -1152 -100 -119 -281 -291 -403 -383 -92 -70 -344 -228 -363 -228 -4 0 -35 29 -70 65 -105 109 -219 151 -345 125 -36 -7 -108 -38 -184 -78 -489 -261 -847 -376 -1345 -434 -180 -21 -653 -15 -955 11 -140 13 -338 25 -440 28 l-185 5 125 -126 125 -126 75 6 c97 8 170 -17 234 -82 65 -64 90 -137 82 -234 l-6 -75 206 -206 206 -207 83 6 c73 4 89 2 137 -20 184 -84 232 -302 100 -449 -67 -75 -110 -94 -212 -94 -68 0 -93 5 -125 22 -51 27 -119 100 -140 150 -19 43 -24 127 -12 188 l8 40 -201 200 -200 200 0 -531 0 -531 26 -14 c41 -22 101 -96 118 -146 38 -110 8 -222 -80 -302 -96 -88 -207 -103 -321 -45 -134 69 -192 232 -130 367 26 58 83 119 128 139 l29 13 0 531 0 532 -28 11 c-42 18 -108 89 -132 144 -24 53 -28 144 -10 191 11 30 9 32 -203 245 -117 119 -219 230 -226 246 -44 103 -170 239 -486 523 -412 371 -643 616 -819 865 -236 336 -397 688 -501 1092 -44 170 -80 249 -141 305 -76 70 -138 92 -263 95 l-106 2 -28 109 c-49 190 -70 366 -71 589 -1 220 10 324 54 505 61 246 161 471 308 691 134 200 315 410 326 378 3 -8 19 -68 36 -134 136 -520 354 -976 638 -1332 95 -119 277 -319 322 -354 l33 -25 -89 -49 c-166 -93 -288 -240 -324 -393 -15 -66 -15 -212 0 -289 24 -120 126 -300 267 -476 139 -172 374 -408 455 -456 181 -106 352 -125 492 -54 66 33 153 123 193 198 17 33 365 794 773 1690 408 897 760 1668 782 1715 72 154 120 262 116 265 -1 1 -91 40 -198 85 -321 136 -871 371 -935 400 -33 15 -161 70 -285 123 -735 312 -1076 459 -1082 466 -11 10 201 501 216 501 6 0 200 -81 431 -181 1489 -641 2052 -882 2070 -886 17 -3 33 24 118 212 l97 217 -48 61 c-96 122 -154 239 -194 392 -30 114 -36 323 -13 436 23 114 72 242 131 341 58 96 199 245 293 308 124 83 285 146 437 170 97 15 276 4 386 -24z"
       id="path4"
       style="fill:#192a56;fill-opacity:1" />
    <path

       d="M11496 14790 c-110 -28 -228 -126 -281 -234 -103 -210 -11 -470 203 -577 65 -33 71 -34 187 -34 116 0 122 1 187 34 82 41 169 128 204 206 99 217 11 466 -202 571 -66 33 -83 37 -166 40 -51 2 -110 -1 -132 -6z"
       id="path6"
       style="fill:#192a56;fill-opacity:1" />
  </g>
</svg>