diff --git a/apps/gitea/manifest.yml b/apps/gitea/manifest.yml new file mode 100644 index 00000000..4af96688 --- /dev/null +++ b/apps/gitea/manifest.yml @@ -0,0 +1,42 @@ +id: gitea +name: Gitea +version: "1.23" +description: Self-hosted Git service with built-in container registry, CI/CD, and package hosting. +category: development +icon: git-branch +port: 3000 +ssh_port: 2222 +image: docker.io/gitea/gitea:1.23 +tier: optional + +requires: + memory_mb: 256 + disk_mb: 500 + +volumes: + - host: /var/lib/archipelago/gitea/data + container: /data + - host: /var/lib/archipelago/gitea/config + container: /etc/gitea + +environment: + GITEA__database__DB_TYPE: sqlite3 + GITEA__server__SSH_PORT: "2222" + GITEA__server__SSH_LISTEN_PORT: "22" + GITEA__server__LFS_START_SERVER: "true" + GITEA__packages__ENABLED: "true" + GITEA__repository__ENABLE_PUSH_CREATE_USER: "true" + GITEA__repository__ENABLE_PUSH_CREATE_ORG: "true" + +health_check: + endpoint: / + interval: 120 + timeout: 5 + retries: 3 + +features: + - Git repositories with web UI + - Built-in container/package registry + - Issue tracking and pull requests + - CI/CD via Gitea Actions + - Lightweight (SQLite, no external DB needed) diff --git a/core/archipelago/src/api/rpc/package/config.rs b/core/archipelago/src/api/rpc/package/config.rs index 67de0f43..2a54ed82 100644 --- a/core/archipelago/src/api/rpc/package/config.rs +++ b/core/archipelago/src/api/rpc/package/config.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; /// Trusted Docker registries. Only images from these sources are allowed. #[allow(dead_code)] -pub(super) const TRUSTED_REGISTRIES: &[&str] = &["docker.io/", "ghcr.io/", "localhost/", "git.tx1138.com/"]; +pub(super) const TRUSTED_REGISTRIES: &[&str] = &["docker.io/", "ghcr.io/", "localhost/", "git.tx1138.com/", "23.182.128.160:3000/"]; /// Validate Docker image against trusted registry allowlist. pub(super) fn is_valid_docker_image(image: &str) -> bool { @@ -21,7 +21,7 @@ pub(super) fn is_valid_docker_image(image: &str) -> bool { Some(r) => r, None => return false, }; - matches!(registry, "docker.io" | "ghcr.io" | "localhost" | "git.tx1138.com") + matches!(registry, "docker.io" | "ghcr.io" | "localhost" | "git.tx1138.com" | "23.182.128.160:3000") } /// Per-app Linux capabilities needed beyond the default cap-drop=ALL. @@ -894,6 +894,24 @@ pub(super) async fn get_app_config( None, ) } + "gitea" => ( + vec!["3000:3000".to_string(), "2222:22".to_string()], + vec![ + "/var/lib/archipelago/gitea/data:/data".to_string(), + "/var/lib/archipelago/gitea/config:/etc/gitea".to_string(), + ], + vec![ + "GITEA__database__DB_TYPE=sqlite3".to_string(), + "GITEA__server__SSH_PORT=2222".to_string(), + "GITEA__server__SSH_LISTEN_PORT=22".to_string(), + "GITEA__server__LFS_START_SERVER=true".to_string(), + "GITEA__packages__ENABLED=true".to_string(), + "GITEA__repository__ENABLE_PUSH_CREATE_USER=true".to_string(), + "GITEA__repository__ENABLE_PUSH_CREATE_ORG=true".to_string(), + ], + None, + None, + ), _ => (vec![], vec![], vec![], None, None), } } diff --git a/image-recipe/configs/nginx-archipelago.conf b/image-recipe/configs/nginx-archipelago.conf index fd78feea..200a5ca1 100644 --- a/image-recipe/configs/nginx-archipelago.conf +++ b/image-recipe/configs/nginx-archipelago.conf @@ -477,6 +477,17 @@ server { sub_filter "src='/" "src='/app/botfights/"; sub_filter '' ''; } + location /app/gitea/ { + proxy_pass http://127.0.0.1:3000/; + proxy_http_version 1.1; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_hide_header X-Frame-Options; + add_header X-Frame-Options "SAMEORIGIN" always; + client_max_body_size 1G; + } location /app/lnd/ { proxy_pass http://127.0.0.1:8081/; proxy_http_version 1.1; diff --git a/neode-ui/public/assets/img/app-icons/gitea.svg b/neode-ui/public/assets/img/app-icons/gitea.svg new file mode 100644 index 00000000..9df6b83b --- /dev/null +++ b/neode-ui/public/assets/img/app-icons/gitea.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/neode-ui/src/views/appSession/appSessionConfig.ts b/neode-ui/src/views/appSession/appSessionConfig.ts index 2d443b2b..43086509 100644 --- a/neode-ui/src/views/appSession/appSessionConfig.ts +++ b/neode-ui/src/views/appSession/appSessionConfig.ts @@ -43,6 +43,7 @@ export const APP_PORTS: Record = { 'routstr': 8200, 'indeedhub': 7778, 'botfights': 9100, + 'gitea': 3000, 'dwn': 3100, 'endurain': 8080, } @@ -88,6 +89,7 @@ export const HTTPS_PROXY_PATHS: Record = { 'grafana': '/app/grafana/', 'indeedhub': '/app/indeedhub/', 'botfights': '/app/botfights/', + 'gitea': '/app/gitea/', 'routstr': '/app/routstr/', 'nostr-vpn': '/app/nostr-vpn/', 'fips': '/app/fips/', @@ -106,7 +108,7 @@ export const EXTERNAL_URLS: Record = { export const APP_TITLES: Record = { 'bitcoin-knots': 'Bitcoin', 'btcpay-server': 'BTCPay Server', 'indeedhub': 'Indeehub', - 'botfights': 'BotFights', '484-kitchen': '484 Kitchen', 'arch-presentation': 'Presentation', + 'botfights': 'BotFights', 'gitea': 'Gitea', '484-kitchen': '484 Kitchen', 'arch-presentation': 'Presentation', 'nostr-vpn': 'Nostr VPN', 'fips': 'FIPS', 'routstr': 'Routstr', 'homeassistant': 'Home Assistant', 'uptime-kuma': 'Uptime Kuma', 'nginx-proxy-manager': 'Nginx Proxy Manager', 'nostr-rs-relay': 'Nostr Relay', diff --git a/neode-ui/src/views/marketplace/marketplaceData.ts b/neode-ui/src/views/marketplace/marketplaceData.ts index d85c6acd..186dafe8 100644 --- a/neode-ui/src/views/marketplace/marketplaceData.ts +++ b/neode-ui/src/views/marketplace/marketplaceData.ts @@ -478,6 +478,18 @@ export function getCuratedAppList(): MarketplaceApp[] { manifestUrl: undefined, repoUrl: 'https://botfights.net', }, + { + id: 'gitea', + title: 'Gitea', + version: '1.23', + category: 'data', + description: 'Self-hosted Git service with built-in container registry, CI/CD, issue tracking, and package hosting. Lightweight alternative to GitHub/GitLab.', + icon: '/assets/img/app-icons/gitea.svg', + author: 'Gitea', + dockerImage: 'docker.io/gitea/gitea:1.23', + manifestUrl: undefined, + repoUrl: 'https://gitea.com', + }, { id: 'nwnn', title: 'Next Web News Network', diff --git a/scripts/image-versions.sh b/scripts/image-versions.sh index 2ff6096d..e4748c7f 100644 --- a/scripts/image-versions.sh +++ b/scripts/image-versions.sh @@ -82,6 +82,9 @@ MINIO_IMAGE="$ARCHY_REGISTRY/minio:RELEASE.2024-11-07T00-52-20Z" INDEEDHUB_POSTGRES_IMAGE="$ARCHY_REGISTRY/postgres:16.13-alpine" INDEEDHUB_REDIS_IMAGE="$ARCHY_REGISTRY/redis:7.4.8-alpine" +# Gitea (Git + Container Registry) +GITEA_IMAGE="docker.io/gitea/gitea:1.23" + # DWN (Decentralized Web Node) DWN_SERVER_IMAGE="$ARCHY_REGISTRY/dwn-server:main"