Ansible role for Gitea service https://gitea.io/
Go to file
Alexis Pentori 9e978c0d94
admin: removing credential to obtain 404 error
When the users endpoint doesn't need auth, but if the credential are
  incorrect it return a code 401. Not adding 401 as expected status_code
  to avoid confusion in case of wrong credential with existing user

Signed-off-by: Alexis Pentori <alexis@status.im>
2023-11-17 14:31:47 +01:00
defaults upgrade from 1.17.0 to 1.20.3 2023-08-31 11:43:39 +02:00
meta add Ansible metadata 2022-10-20 19:15:15 +02:00
tasks admin: removing credential to obtain 404 error 2023-11-17 14:31:47 +01:00
templates move files from infra-office repo 2022-10-20 19:06:55 +02:00
README.md move files from infra-office repo 2022-10-20 19:06:55 +02:00

README.md

Description

This role configures an instance of Gitea using Docker Compose.

Configuration

gitea_app_name: 'Example.org Repos'
gitea_app_web_domain: 'gitea.example.org'
gitea_app_ssh_domain: 'git.example.org'
gitea_app_ssh_port: 22
gitea_app_secret_key: 'super-secret-key'
gitea_app_log_level: 'debug'

# DB
gitea_db_pass: 'super-secret-db-pass'

# Admin
gitea_app_admin_user: 'root'
gitea_app_admin_pass: 'secret-root-pass'
gitea_app_admin_email: 'root@example.org'

Administration

You can manage the services using Docker Compose:

 > docker-compose ps
  Name                 Command               State                           Ports                         
-----------------------------------------------------------------------------------------------------------
gitea-app   /usr/bin/entrypoint /bin/s ...   Up      22/tcp, 0.0.0.0:2222->2222/tcp, 0.0.0.0:3000->3000/tcp
gitea-db    docker-entrypoint.sh postgres    Up      0.0.0.0:5432->5432/tcp  

For example you can easily re-create containers:

 > docker-compose up --force-recreate -d
Recreating gitea-db ... done
Recreating gitea-app ... done

Backups

A Systemd timer creates pg_dump backups of the PostgreSQL database daily:

 > sudo systemctl list-timers -a dump-gitea-db
NEXT                        LEFT    LAST PASSED UNIT                ACTIVATES            
Sat 2021-03-20 00:00:00 UTC 9h left n/a  n/a    dump-gitea-db.timer dump-gitea-db.service