cloudserve-infrastructure/roles/gitea
Marty Oehme 8aaefd3f60
Fix gitea admin deployment to be less brittle
Admin deployment was very timing-dependent: If the server took a while
to set it up, it would always error out while deploying. This commit
adds sufficient grace-time into the admin request call before the error
occurs which should avoid it in most deployments (unless the server is
severely underpowered or over-taxed).

Also fixes admin creation to avoid root usage in the container when it
is not called for.
2022-12-18 12:00:33 +01:00
..
defaults Add simple ci deployment 2021-12-22 18:02:18 +01:00
files Add gitea role 2021-12-13 15:27:30 +01:00
handlers Fix gitea admin deployment to be less brittle 2022-12-18 12:00:33 +01:00
meta Add gitea role 2021-12-13 15:27:30 +01:00
tasks Fix gitea admin deployment to be less brittle 2022-12-18 12:00:33 +01:00
templates Fix gitea admin setup, Add healthcheck 2022-01-22 10:48:31 +01:00
vars Add gitea role 2021-12-13 15:27:30 +01:00
README.md Add gitea role 2021-12-13 15:27:30 +01:00

gitea

A relatively light-weight git server hosting.

Defaults

gitea_upstream_file_dir: "{{ docker_stack_files_dir }}/{{ stack_name }}"

The on-target directory where the proxy configuration file should be stashed.

gitea_use_https: true

Whether the service should be reachable through http (port 80) or through https (port 443) and provision an https certificate. Usually you will want this to stay true.

gitea_version: latest

The docker image version to be used in stack creation.

subdomain_alias: git

If the deployed container should be served over a uri that is not the stack name. By default, it will be set to git.yourdomain.com - if this option is not set it will be served on gitea.yourdomain.com instead.

For now gitea will still need to be initially set up after installation. This could be automated with the help of these commands:

docker run --name gitea -p 8080:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.14.2

$ docker exec gitea migrate
$ docker exec gitea gitea admin user create --admin --username root --password admin1234 --email admin@example.com