From c829d59a2413dba123296a0bd50bf7419758715d Mon Sep 17 00:00:00 2001 From: Nemo <commits@captnemo.in> Date: Wed, 02 Oct 2024 18:28:22 +0530 Subject: [PATCH] minor gitea changes and cleanup --- main.tf | 8 +------- docker/got.tf | 20 -------------------- docker/lychee.tf | 30 ------------------------------ docker/outputs.tf | 4 ---- gitea/main.tf | 16 ++++++++-------- gitea/providers.tf | 12 ------------ docker/conf/humans.txt | 11 ----------- docker/conf/lychee.php.ini | 8 -------- gitea/conf/conf.ini.tpl | 2 +- gitea/conf/home.tmpl | 36 ------------------------------------ gitea/conf/robots.txt | 26 -------------------------- gitea/conf/public/humans.txt | 11 +++++++++++ gitea/conf/public/robots.txt | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 13 files changed, 66 insertions(+), 181 deletions(-) diff --git a/main.tf b/main.tf index 7e3e2e5..ac262f9 100644 --- a/main.tf +++ a/main.tf @@ -105,16 +105,10 @@ smtp-password = data.pass_password.mastodon-smtp-password.password } -// Used to force access to ISP related resources -# module "tinyproxy" { -# source = "./tinyproxy" -# ips = "${var.ips}" -# } - module "gh-runner-blr-today" { source = "./modules/gh-runner" name = "blr-today" - runner_version = "2.317.0" + runner_version = "2.319.0" token = "${data.pass_password.github-actions-runner-token-blr-today.password}" url = "https://github.com/blr-today" } diff --git a/docker/got.tf b/docker/got.tf deleted file mode 100644 index fb4cd74..0000000 100644 --- a/docker/got.tf +++ /dev/null @@ -1,20 +1,0 @@ -data "docker_registry_image" "gotviz" { - name = "tocttou/gotviz:latest" -} - -# resource "docker_image" "gotviz" { -# name = "${data.docker_registry_image.gotviz.name}" -# pull_triggers = ["${data.docker_registry_image.gotviz.sha256_digest}"] -# } -# resource "docker_container" "gotviz" { -# name = "gotviz" -# image = "${docker_image.gotviz.image_id}" -# labels = "${merge( -# local.traefik_common_labels, map( -# "traefik.port", 8080, -# "traefik.frontend.rule","Host:got-relationships.${var.domain}" -# ))}" -# restart = "unless-stopped" -# destroy_grace_seconds = 60 -# must_run = true -# } diff --git a/docker/lychee.tf b/docker/lychee.tf deleted file mode 100644 index d728138..0000000 100644 --- a/docker/lychee.tf +++ /dev/null @@ -1,30 +1,0 @@ -# resource "docker_container" "lychee" { -# name = "lychee" -# image = "${docker_image.lychee.image_id}" -# restart = "unless-stopped" -# destroy_grace_seconds = 10 -# must_run = true -# volumes { -# host_path = "/mnt/xwing/config/lychee" -# container_path = "/config" -# } -# volumes { -# host_path = "/mnt/xwing/data/lychee" -# container_path = "/pictures" -# } -# upload { -# content = "${file("${path.module}/conf/lychee.php.ini")}" -# file = "/config/lychee/user.ini" -# } -# labels = "${merge( -# local.traefik_common_labels, -# map( -# "traefik.port", 80, -# "traefik.frontend.rule", "Host:pics.${var.domain}", -# ))}" -# env = [ -# "PUID=986", -# "PGID=984", -# ] -# # links = ["${var.links-mariadb}"] -# } diff --git a/docker/outputs.tf b/docker/outputs.tf index ca08f80..1691abf 100644 --- a/docker/outputs.tf +++ a/docker/outputs.tf @@ -1,7 +1,3 @@ -# output "lychee-ip" { -# value = "${docker_container.lychee.ip_address}" -# } - output "names-traefik" { value = docker_container.traefik.name } diff --git a/gitea/main.tf b/gitea/main.tf index 08f3d7e..d896ba8 100644 --- a/gitea/main.tf +++ a/gitea/main.tf @@ -32,35 +32,35 @@ # PNG images upload { content_base64 = filebase64("${path.module}/conf/public/img/gitea-lg.png") - file = "/data/gitea/public/img/logo.png" + file = "/data/gitea/public/assets/img/logo.png" } upload { content_base64 = filebase64("${path.module}/conf/public/img/gitea-lg.png") - file = "/data/gitea/public/img/apple-touch-icon.png" + file = "/data/gitea/public/assets/img/apple-touch-icon.png" } upload { content_base64 = filebase64("${path.module}/conf/public/img/gitea-sm.png") - file = "/data/gitea/public/img/favicon.png" + file = "/data/gitea/public/assets/img/favicon.png" } # SVG images upload { content_base64 = filebase64("${path.module}/conf/public/img/favicon.svg") - file = "/data/gitea/public/img/logo.svg" + file = "/data/gitea/public/assets/img/logo.svg" } upload { content_base64 = filebase64("${path.module}/conf/public/img/favicon.svg") - file = "/data/gitea/public/img/favicon.svg" + file = "/data/gitea/public/assets/img/favicon.svg" } # Some files at top-level upload { - content = file("${path.module}/../docker/conf/humans.txt") - file = "/data/gitea/humans.txt" + content = file("${path.module}/conf/public/humans.txt") + file = "/data/gitea/public/humans.txt" } upload { content = file("${path.module}/conf/public/robots.txt") - file = "/data/gitea/robots.txt" + file = "/data/gitea/public/robots.txt" } # Extra Links in header diff --git a/gitea/providers.tf b/gitea/providers.tf index c8dd4a4..b433ffb 100644 --- a/gitea/providers.tf +++ a/gitea/providers.tf @@ -1,17 +1,5 @@ terraform { required_providers { - pass = { - source = "camptocamp/pass" - } - digitalocean = { - source = "digitalocean/digitalocean" - } - postgresql = { - source = "cyrilgdn/postgresql" - } - cloudflare = { - source = "cloudflare/cloudflare" - } docker = { source = "kreuzwerker/docker" } diff --git a/docker/conf/humans.txt b/docker/conf/humans.txt deleted file mode 100644 index e82208f..0000000 100644 --- a/docker/conf/humans.txt +++ /dev/null @@ -1,11 +1,0 @@ -/* TEAM */ - Captain: Nemo (Abhay Rana) - Contact: git [at] captnemo.in - Twitter: @captn3m0 - -/* SITE */ - Last update: Feb 2018 - Language: English - IDE: Sublime Text, Vim - Runs-On: Docker - Details: https://git.captnemo.in/nemo/nebula/ diff --git a/docker/conf/lychee.php.ini b/docker/conf/lychee.php.ini deleted file mode 100644 index 366c821..0000000 100644 --- a/docker/conf/lychee.php.ini +++ /dev/null @@ -1,8 +1,0 @@ -; Uncomment these lines to change PHP parameters if you are using PHP with CGI or FastCGI. Only works with PHP starting from 5.3.0. -; Note that with FastCGI, you might also want to set FcgidBusyTimeout, FcgidIOTimeout and FcgidMaxRequestLen in your Apache config - -max_execution_time = 200 -post_max_size = 200M -upload_max_size = 200M -upload_max_filesize = 50M -max_file_uploads = 200 diff --git a/gitea/conf/conf.ini.tpl b/gitea/conf/conf.ini.tpl index d1aa2cf..fdad3f5 100644 --- a/gitea/conf/conf.ini.tpl +++ a/gitea/conf/conf.ini.tpl @@ -281,7 +281,7 @@ ENABLED = true [oauth2] -ENABLE = false +ENABLED = false ; this is same as JWT secret above JWT_SECRET = "${oauth2-jwt-secret}" diff --git a/gitea/conf/home.tmpl b/gitea/conf/home.tmpl deleted file mode 100644 index b2134a1..0000000 100644 --- a/gitea/conf/home.tmpl +++ /dev/null @@ -1,36 +1,0 @@ -{{template "base/head" .}} -<div class="home"> - <div class="ui stackable middle very relaxed page grid"> - <div class="sixteen wide center aligned centered column"> - <div> - <img class="logo" src="{{AppSubUrl}}/img/gitea-lg.png" /> - </div> - <div class="hero"> - <h1 class="ui icon header title"> - Nemo's Code - </h1> - <h2>under-the-tv code hosting service</h2> - </div> - </div> - </div> - <div class="ui stackable middle very relaxed page grid"> - <div class="eight wide center column"> - <h1 class="hero ui icon header"> - <i class="octicon octicon-rocket"></i> - Run by friends - </h1> - <p class="large"> - This service is run by <a href="https://captnemo.in">Nemo</a> - </p> - </div> - <div class="eight wide center column"> - <h1 class="hero ui icon header"> - <i class="octicon octicon-flame"></i> Uptime not guaranteed - </h1> - <p class="large"> - Run for fun and not profit. - </p> - </div> - </div> -</div> -{{template "base/footer" .}} diff --git a/gitea/conf/robots.txt b/gitea/conf/robots.txt deleted file mode 100644 index 222f4b3..0000000 100644 --- a/gitea/conf/robots.txt +++ /dev/null @@ -1,26 +1,0 @@ -User-agent: MJ12bot -Disallow: / -User-agent: SemrushBot -Disallow: / -User-agent: SemrushBot-SA -Disallow: / -User-agent: rogerbot -Disallow:/ -User-agent: dotbot -Disallow:/ -User-agent: AhrefsBot -Disallow: / -User-agent: Alexibot -Disallow: / -User-agent: SurveyBot -Disallow: / -User-agent: Xenu’s -Disallow: / -User-agent: Xenu’s Link Sleuth 1.1c -Disallow: / -User-agent: AhrefsBot -Disallow: / -User-Agent: ImagesiftBot -Disallow: / -User-Agent: YandexBot -Disallow: / diff --git a/gitea/conf/public/humans.txt b/gitea/conf/public/humans.txt new file mode 100644 index 0000000..e82208f 100644 --- /dev/null +++ a/gitea/conf/public/humans.txt @@ -1,0 +1,11 @@ +/* TEAM */ + Captain: Nemo (Abhay Rana) + Contact: git [at] captnemo.in + Twitter: @captn3m0 + +/* SITE */ + Last update: Feb 2018 + Language: English + IDE: Sublime Text, Vim + Runs-On: Docker + Details: https://git.captnemo.in/nemo/nebula/ diff --git a/gitea/conf/public/robots.txt b/gitea/conf/public/robots.txt index 222f4b3..8e11079 100644 --- a/gitea/conf/public/robots.txt +++ a/gitea/conf/public/robots.txt @@ -1,26 +1,53 @@ +User-agent: AhrefsBot +User-agent: AI2Bot +User-agent: Ai2Bot-Dolma +User-agent: Alexibot +User-agent: Amazonbot +User-agent: anthropic-ai +User-agent: Applebot +User-agent: Applebot-Extended +User-agent: Bytespider +User-agent: CCBot +User-agent: ChatGPT-User +User-agent: Claude-Web +User-agent: ClaudeBot +User-agent: cohere-ai +User-agent: Diffbot +User-agent: dotbot +User-agent: FacebookBot +User-agent: facebookexternalhit +User-agent: FriendlyCrawler +User-agent: Google-Extended +User-agent: GoogleOther +User-agent: GoogleOther-Image +User-agent: GoogleOther-Video +User-agent: GPTBot +User-agent: iaskspider/2.0 +User-agent: ICC-Crawler +User-Agent: ImagesiftBot +User-agent: ImagesiftBot +User-agent: img2dataset +User-agent: ISSCyberRiskCrawler +User-agent: Kangaroo Bot +User-agent: Meta-ExternalAgent +User-agent: Meta-ExternalFetcher User-agent: MJ12bot -Disallow: / +User-agent: OAI-SearchBot +User-agent: omgili +User-agent: omgilibot +User-agent: PerplexityBot +User-agent: PetalBot +User-agent: rogerbot +User-agent: Scrapy User-agent: SemrushBot -Disallow: / User-agent: SemrushBot-SA -Disallow: / -User-agent: rogerbot -Disallow:/ -User-agent: dotbot -Disallow:/ -User-agent: AhrefsBot -Disallow: / -User-agent: Alexibot -Disallow: / +User-agent: Sidetrade indexer bot User-agent: SurveyBot -Disallow: / +User-agent: Timpibot +User-agent: VelenPublicWebCrawler +User-agent: Webzio-Extended User-agent: Xenu’s -Disallow: / User-agent: Xenu’s Link Sleuth 1.1c -Disallow: / -User-agent: AhrefsBot -Disallow: / -User-Agent: ImagesiftBot -Disallow: / User-Agent: YandexBot +User-agent: YouBot Disallow: / -- rgit 0.1.5