Git over SSH for Forgejo and Gitea (tcp_ports) (#27)

This commit is contained in:
michael authored and GitHub committed 2026-11-22 19:47:21 -05:00
1 parent 7b6851c023
commit f3157b71f3
9 files changed
+72 -15

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ Sign-ups are off, so nobody else can make an account. Add people under **Site ad
## Your first repository
Choose **+ → New repository**, or **+ → New migration** to bring one over from GitHub, GitLab, Gitea or another forge, with its issues and pull requests. Clone and push over HTTPS. SSH isn't available on Cottage; create an access token under **Settings → Applications** to use as your Git password.
Choose **+ → New repository**, or **+ → New migration** to bring one over from GitHub, GitLab, Gitea or another forge, with its issues and pull requests. Clone and push over SSH or HTTPS. For SSH, add your public key under **Settings → SSH / GPG Keys**; the clone button shows the app's own SSH address and port ([more](https://cottage.host/docs/ssh)). For HTTPS, create an access token under **Settings → Applications** to use as your Git password.
Forgejo sends notifications and password resets by email once you fill in the **Email** settings for the app in your Cottage dashboard with your mail provider's details ([how](https://cottage.host/docs/email)). Notifications always show up in the bell menu too.
+12 -4
View File
@@ -3,13 +3,17 @@ x-harbor:
slug: forgejo
name: Forgejo
description: Self-hosted software forge.
version: "17.0.2-c2"
version: "17.0.2-c3"
primary: { service: app, port: 3000 }
health_path: /api/healthz
default_resources: { cpu_millis: 500, memory_mb: 512, storage_mb: 10240 }
min_resources: { cpu_millis: 250, memory_mb: 256, storage_mb: 2048 }
volumes:
data: { uid: 1000, gid: 1000, mode: "0750" }
# Git over SSH: the built-in SSH server (port 2222 in the rootless image) on a public port
# of its own. Cottage passes the address in HARBOR_TCP_HOST and HARBOR_PORT_SSH.
tcp_ports:
- { name: ssh, service: app, port: 2222 }
parameters:
- { key: SECRET_KEY, label: Secret key, type: string, secret: true, generate: random32 }
- { key: ADMIN_PASSWORD, label: Admin password, type: string, secret: true, generate: random32 }
@@ -45,9 +49,13 @@ services:
FORGEJO__server__DOMAIN: ${HARBOR_HOSTNAME}
FORGEJO__server__ROOT_URL: ${HARBOR_PUBLIC_URL}/
FORGEJO__server__HTTP_PORT: "3000"
# Only HTTPS reaches the app, so clone over HTTPS.
FORGEJO__server__DISABLE_SSH: "true"
FORGEJO__server__START_SSH_SERVER: "false"
# Git over SSH with the app's built-in server. Clone URLs show the public address
# Cottage gives it, not the port the server listens on inside the container.
FORGEJO__server__DISABLE_SSH: "false"
FORGEJO__server__START_SSH_SERVER: "true"
FORGEJO__server__SSH_LISTEN_PORT: "2222"
FORGEJO__server__SSH_DOMAIN: ${HARBOR_TCP_HOST}
FORGEJO__server__SSH_PORT: ${HARBOR_PORT_SSH}
FORGEJO__service__DISABLE_REGISTRATION: ${DISABLE_REGISTRATION}
# Mail through the owner's provider; off while no SMTP server is set.
FORGEJO__mailer__ENABLED: ${SMTP_HOST:+true}
+1 -1
View File
@@ -6,7 +6,7 @@ Sign-ups are off, so nobody else can make an account. Add people under **Site Ad
## Your first repository
Choose **+ → New Repository**, or **+ → New Migration** to bring one over from GitHub, GitLab or another Git host, with its issues and pull requests. Clone and push over HTTPS. SSH isn't available on Cottage; create an access token under **Settings → Applications** to use as your Git password.
Choose **+ → New Repository**, or **+ → New Migration** to bring one over from GitHub, GitLab or another Git host, with its issues and pull requests. Clone and push over SSH or HTTPS. For SSH, add your public key under **Settings → SSH / GPG Keys**; the clone button shows the app's own SSH address and port ([more](https://cottage.host/docs/ssh)). For HTTPS, create an access token under **Settings → Applications** to use as your Git password.
Gitea sends notifications and password resets by email once you fill in the **Email** settings for the app in your Cottage dashboard with your mail provider's details ([how](https://cottage.host/docs/email)). Notifications always show up in the bell menu too.
+12 -4
View File
@@ -3,13 +3,17 @@ x-harbor:
slug: gitea
name: Gitea
description: Self-hosted Git service.
version: "28.4.0-c2"
version: "28.4.0-c3"
primary: { service: app, port: 3000 }
health_path: /api/healthz
default_resources: { cpu_millis: 500, memory_mb: 512, storage_mb: 10240 }
min_resources: { cpu_millis: 250, memory_mb: 256, storage_mb: 2048 }
volumes:
data: { uid: 1000, gid: 1000, mode: "0750" }
# Git over SSH: the built-in SSH server (port 2222 in the rootless image) on a public port
# of its own. Cottage passes the address in HARBOR_TCP_HOST and HARBOR_PORT_SSH.
tcp_ports:
- { name: ssh, service: app, port: 2222 }
parameters:
- { key: SECRET_KEY, label: Secret key, type: string, secret: true, generate: random32 }
- { key: ADMIN_PASSWORD, label: Admin password, type: string, secret: true, generate: random32 }
@@ -47,9 +51,13 @@ services:
GITEA__server__DOMAIN: ${HARBOR_HOSTNAME}
GITEA__server__ROOT_URL: ${HARBOR_PUBLIC_URL}/
GITEA__server__HTTP_PORT: "3000"
# Only HTTPS reaches the app, so clone over HTTPS.
GITEA__server__DISABLE_SSH: "true"
GITEA__server__START_SSH_SERVER: "false"
# Git over SSH with the app's built-in server. Clone URLs show the public address
# Cottage gives it, not the port the server listens on inside the container.
GITEA__server__DISABLE_SSH: "false"
GITEA__server__START_SSH_SERVER: "true"
GITEA__server__SSH_LISTEN_PORT: "2222"
GITEA__server__SSH_DOMAIN: ${HARBOR_TCP_HOST}
GITEA__server__SSH_PORT: ${HARBOR_PORT_SSH}
GITEA__service__DISABLE_REGISTRATION: ${DISABLE_REGISTRATION}
# Mail through the owner's provider; off while no SMTP server is set.
GITEA__mailer__ENABLED: ${SMTP_HOST:+true}