Move Forgejo SSH to port 2223 and document conflicts
Some checks are pending
CI / checks (push) Waiting to run

This commit is contained in:
Tero Halla-aho 2025-12-11 22:16:18 +02:00
parent 47b5fd7f87
commit be0b194737
2 changed files with 4 additions and 2 deletions

View file

@ -6,6 +6,7 @@ Lightweight Git hosting + CI with Forgejo (Gitea fork) behind Apache on halla-ah
Whats included Whats included
- Docker Compose for Forgejo + SSH and an Actions runner (`forgejo/docker-compose.yml`). - 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. - 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 Prereqs
- Docker installed on halla-aho.net. - Docker installed on halla-aho.net.
@ -22,6 +23,7 @@ Deploy Forgejo
``` ```
docker compose -f forgejo/docker-compose.yml up -d 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`): 3) Configure Apache (already added to `default-ssl.conf`):
- VirtualHost `git.halla-aho.net:9443` proxies to `http://127.0.0.1:3200/`. - 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). - TLS files: `/etc/apache2/ssl/git.halla-aho.net.{crt,key,chain.crt}` (update if different).

View file

@ -14,7 +14,7 @@ services:
- FORGEJO__SERVER__HTTP_PORT=3000 - FORGEJO__SERVER__HTTP_PORT=3000
- FORGEJO__SERVER__PROTOCOL=http - FORGEJO__SERVER__PROTOCOL=http
- FORGEJO__SERVER__SSH_DOMAIN=git.halla-aho.net - 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__DB_TYPE=sqlite3
- FORGEJO__DATABASE__PATH=/data/forgejo.db - FORGEJO__DATABASE__PATH=/data/forgejo.db
- FORGEJO__MAILER__ENABLED=false - FORGEJO__MAILER__ENABLED=false
@ -22,7 +22,7 @@ services:
- /srv/forgejo/data:/data - /srv/forgejo/data:/data
ports: ports:
- "3200:3000" # HTTP (Apache will reverse proxy) - "3200:3000" # HTTP (Apache will reverse proxy)
- "2222:22" # SSH for git - "2223:22" # SSH for git
runner: runner:
image: codeberg.org/forgejo/runner:4 image: codeberg.org/forgejo/runner:4