7cfea87d99b7eeab00d7b61bd47d597fd90fff5c
Forgejo
- Maintainer: @p4u1, @fauno
- Category: Development
- Status: 5
- Image:
forgejo/forgejo, 4, upstream - Healthcheck: Yes
- Backups: Yes
- Email: Yes
- Tests: 2
- SSO: 3 (OAuth)
Basic usage
- Set up Docker Swarm and [
abra][abra] - Deploy [
coop-cloud/traefik][cc-traefik] abra app new forgejo --secrets(optionally with--passif you'd like to save secrets inpass)abra app config YOURAPPDOMAIN- be sure to change$DOMAINto something that resolves to your Docker swarm boxabra app deploy YOURAPPDOMAIN
Create first user
Run
abra app run YOURAPPNAME app forgejo -c /etc/gitea/app.ini admin user create --username USERNAME --admin --random-password --email EMAIL
See the Gitea command-line documentation for more options. Make sure not to forget the -c /etc/gitea/app.ini.
Enable SSH
You most certainly want to be able to access your repository over SSH. To do so, make sure you uncomment the right lines in the configuration for traefik.
abra app config YOURTRAEFIKAPP
There uncomment or add these lines:
GITEA_SSH_ENABLED=1
COMPOSE_FILE="compose.yml:compose.gitea.yml"
Then redeploy traefik:
abra app undeploy YOURTRAEFIKAPP
abra app deploy YOURTRAEFIKAPP
You might need to wait a bit. To check if it worked, you can run
telnet my.forgejo.example.com 2222
Once you have added a public SSH key, you can check that you can connect to your Forgejo server with
ssh -T -p 2222 git@my.forgejo.example.com
Protect Forgejo from scrapers with Anubis
Uncomment the Anubis compose file from the .env file and re-deploy the
app. Don't forget to actually enable Anubis on the Traefik app
too!
Languages
Shell
100%