Add Forgejo SSH port 2222 and open in UFW

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jack 2026-03-20 19:43:22 +07:00
parent a1b97f3e4b
commit 652737239d
2 changed files with 10 additions and 0 deletions

View file

@ -6,6 +6,13 @@
proto: tcp proto: tcp
comment: "SSH" comment: "SSH"
- name: Allow Forgejo SSH
community.general.ufw:
rule: allow
port: "2222"
proto: tcp
comment: "Forgejo SSH"
- name: Allow HTTP - name: Allow HTTP
community.general.ufw: community.general.ufw:
rule: allow rule: allow

View file

@ -108,7 +108,10 @@ services:
- FORGEJO__server__DOMAIN={{ domain_git }} - FORGEJO__server__DOMAIN={{ domain_git }}
- FORGEJO__server__ROOT_URL=https://{{ domain_git }} - FORGEJO__server__ROOT_URL=https://{{ domain_git }}
- FORGEJO__server__SSH_DOMAIN={{ domain_git }} - FORGEJO__server__SSH_DOMAIN={{ domain_git }}
- FORGEJO__server__SSH_PORT=2222
- FORGEJO__service__DISABLE_REGISTRATION=true - FORGEJO__service__DISABLE_REGISTRATION=true
ports:
- "2222:22"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.forgejo.rule=Host(`{{ domain_git }}`)" - "traefik.http.routers.forgejo.rule=Host(`{{ domain_git }}`)"