Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/status-im/infra-role-gitea
Ansible role for Gitea service
https://github.com/status-im/infra-role-gitea
ansible-role git infra
Last synced: about 1 month ago
JSON representation
Ansible role for Gitea service
- Host: GitHub
- URL: https://github.com/status-im/infra-role-gitea
- Owner: status-im
- Created: 2022-10-20T17:01:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T09:15:56.000Z (6 months ago)
- Last Synced: 2025-01-01T20:08:49.436Z (about 1 month ago)
- Topics: ansible-role, git, infra
- Language: Python
- Homepage: https://gitea.io/
- Size: 45.9 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Description
This role configures an instance of [Gitea](https://gitea.io/) using Docker Compose.
# Configuration
```yaml
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: '[email protected]'
```## Initialisation
Organization can be initialised with:
```yaml
gitea_organizations:
- org1
- org2
```## Purge
A purge is run daily and remove all containers older than `gitea_purge_max_retention` days.
It can be configure with:
```yaml
gitea_container_purge_timer_frequency: 'daily'
gitea_purge_max_retention: 15
```# 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
```