From be0b194737d3750528391296374846eec8fe6c91 Mon Sep 17 00:00:00 2001 From: Tero Halla-aho Date: Thu, 11 Dec 2025 22:16:18 +0200 Subject: [PATCH] Move Forgejo SSH to port 2223 and document conflicts --- forgejo/README.md | 2 ++ forgejo/docker-compose.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/forgejo/README.md b/forgejo/README.md index 2978ed6..d38b24f 100644 --- a/forgejo/README.md +++ b/forgejo/README.md @@ -6,6 +6,7 @@ Lightweight Git hosting + CI with Forgejo (Gitea fork) behind Apache on halla-ah What’s included - Docker Compose for Forgejo + SSH and an Actions runner (`forgejo/docker-compose.yml`). - Apache vhost snippet (added to `default-ssl.conf`) to reverse-proxy `git.halla-aho.net` to the Forgejo container on port 3200. +- SSH for git is exposed on host port 2223 (mapped to container 22); change in compose if that port is taken. Prereqs - Docker installed on halla-aho.net. @@ -22,6 +23,7 @@ Deploy Forgejo ``` docker compose -f forgejo/docker-compose.yml up -d forgejo ``` + - If port 2223 is already in use, edit `forgejo/docker-compose.yml` (`ports:` and `FORGEJO__SERVER__SSH_PORT`) to another free port, then rerun the command. 3) Configure Apache (already added to `default-ssl.conf`): - VirtualHost `git.halla-aho.net:9443` proxies to `http://127.0.0.1:3200/`. - TLS files: `/etc/apache2/ssl/git.halla-aho.net.{crt,key,chain.crt}` (update if different). diff --git a/forgejo/docker-compose.yml b/forgejo/docker-compose.yml index 1ff4d71..ede27df 100644 --- a/forgejo/docker-compose.yml +++ b/forgejo/docker-compose.yml @@ -14,7 +14,7 @@ services: - FORGEJO__SERVER__HTTP_PORT=3000 - FORGEJO__SERVER__PROTOCOL=http - FORGEJO__SERVER__SSH_DOMAIN=git.halla-aho.net - - FORGEJO__SERVER__SSH_PORT=2222 + - FORGEJO__SERVER__SSH_PORT=2223 - FORGEJO__DATABASE__DB_TYPE=sqlite3 - FORGEJO__DATABASE__PATH=/data/forgejo.db - FORGEJO__MAILER__ENABLED=false @@ -22,7 +22,7 @@ services: - /srv/forgejo/data:/data ports: - "3200:3000" # HTTP (Apache will reverse proxy) - - "2222:22" # SSH for git + - "2223:22" # SSH for git runner: image: codeberg.org/forgejo/runner:4