{"id":17494298,"url":"https://github.com/lkubb/salt-gitea-formula","last_synced_at":"2026-02-11T01:32:13.098Z","repository":{"id":134852525,"uuid":"483847576","full_name":"lkubb/salt-gitea-formula","owner":"lkubb","description":"Configure a Gitea server with Salt.","archived":false,"fork":false,"pushed_at":"2024-11-13T23:07:15.000Z","size":319,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T15:31:48.054Z","etag":null,"topics":["devops","git","gitea","salt-formula","saltstack","saltstack-formula","selfhosted"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkubb.png","metadata":{"files":{"readme":"docs/README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-20T23:49:52.000Z","updated_at":"2024-11-13T23:07:19.000Z","dependencies_parsed_at":"2024-02-17T19:26:24.999Z","dependency_job_id":"2d07cab3-9ac4-46f9-bb85-a55ff307a202","html_url":"https://github.com/lkubb/salt-gitea-formula","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lkubb/salt-gitea-formula","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-gitea-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-gitea-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-gitea-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-gitea-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkubb","download_url":"https://codeload.github.com/lkubb/salt-gitea-formula/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-gitea-formula/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29324198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T00:34:26.354Z","status":"ssl_error","status_checked_at":"2026-02-11T00:34:09.494Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","git","gitea","salt-formula","saltstack","saltstack-formula","selfhosted"],"created_at":"2024-10-19T13:06:05.768Z","updated_at":"2026-02-11T01:32:13.062Z","avatar_url":"https://github.com/lkubb.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":".. _readme:\n\nGitea Formula\n=============\n\n|img_sr| |img_pc|\n\n.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n   :alt: Semantic Release\n   :scale: 100%\n   :target: https://github.com/semantic-release/semantic-release\n.. |img_pc| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\n   :alt: pre-commit\n   :scale: 100%\n   :target: https://github.com/pre-commit/pre-commit\n\nManage Gitea with Salt.\n\n.. contents:: **Table of Contents**\n   :depth: 1\n\nGeneral notes\n-------------\n\nSee the full `SaltStack Formulas installation and usage instructions\n\u003chttps://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html\u003e`_.\n\nIf you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section\n\u003chttps://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#writing-formulas\u003e`_.\n\nIf you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,\nwhich contains the currently released version. This formula is versioned according to `Semantic Versioning \u003chttp://semver.org/\u003e`_.\n\nSee `Formula Versioning Section \u003chttps://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#versioning\u003e`_ for more details.\n\nIf you need (non-default) configuration, please refer to:\n\n- `how to configure the formula with map.jinja \u003cmap.jinja.rst\u003e`_\n- the ``pillar.example`` file\n- the `Special notes`_ section\n\nSpecial notes\n-------------\n* This installs from the `official binary source \u003chttps://dl.gitea.io/gitea/\u003e`_.\n* The formula is currently Linux/systemd-centric. It should be relatively easy to provide the correct parameters and service file for other platforms though.\n* Since the formula skips the web installer, you will need to provide at least the database configuration.\n* You can optionally specify the secrets, but they can be autogenerated by Salt as well. In that case, they will be saved in a separate file inside your config dir.\n* All the paths are modifiable, find them in ``lookup:paths``. You should not need to set the corresponding values in your config, they are added automatically.\n* If Gitea requires mounts for some of the paths, you can specify them in ``service:requires_mount`` as a list.\n* If Gitea requires a local service unit (e.g. Redis server), specify it/them in ``service:wants`` as a list. This formula will do its best to automatically add a locally running database service to this list.\n\nRST mod\n^^^^^^^\nThis formula provides basic support for installing an external ``rst`` renderer. This especially makes Gitea display ``README.rst`` files similar to as it does for ``README.md``.\n\nThe installation is not included by default, you will have to specifically target ``gitea.mods.rst`` to the minion. Furthermore, you will have to setup the external renderer in your ``app.ini`` similar to:\n\n.. code-block:: yaml\n\n  markup.restructuredtext:\n    enabled: true\n    file_extensions: '.rst'\n    render_command: timeout 30s /usr/local/bin/grst\n    is_input_file: true\n  markup.sanitizer.restructuredtext:\n    element: pre\n    allow_attr: class\n    regexp: ''\n\nThe mod compiles ``chroma`` (the syntax highlighting library that is used by Gitea) from source and installs a Python script that renders RST files, which currently relies on ``chroma`` and the ``docutils`` python package. The parameters can be modified in ``gitea:lookup:mod_rst``. I currently use this to patch ``*.sls``, ``*.jinja`` and ``*.j2`` highlighting into ``chroma``.\n\n\nConfiguration\n-------------\nAn example pillar is provided, please see `pillar.example`. Note that you do not need to specify everything by pillar. Often, it's much easier and less resource-heavy to use the ``parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` files for non-sensitive settings. The underlying logic is explained in `map.jinja`.\n\n\nAvailable states\n----------------\n\nThe following states are found in this formula:\n\n.. contents::\n   :local:\n\n\n``gitea``\n^^^^^^^^^\n*Meta-state*.\n\nThis installs Gitea,\nmanages its configuration\nand then starts the ``gitea`` service.\n\n\n``gitea.package``\n^^^^^^^^^^^^^^^^^\nInstalls Gitea only.\n\nReleases are downloaded from the official server by default\nand their signatures verified.\n\n\n``gitea.config``\n^^^^^^^^^^^^^^^^\nManages Gitea configuration.\nHas a dependency on `gitea.package`_.\n\n\n``gitea.service``\n^^^^^^^^^^^^^^^^^\nStarts the Gitea service and enables it at boot time.\nHas a dependency on `gitea.config`_.\n\n\n``gitea.go``\n^^^^^^^^^^^^\nCreates a build user and downloads Go.\nRequired for building Chroma.\n\n\n``gitea.mods.rst``\n^^^^^^^^^^^^^^^^^^\nCompiles `Chroma \u003chttps://github.com/alecthomas/chroma\u003e`_ from source\nand installs a Python script that can be setup as an external renderer\nfor ``*.rst`` files.\n\nHas a dependency on `gitea.go`_.\n\n\n``gitea.clean``\n^^^^^^^^^^^^^^^\n*Meta-state*.\n\nUndoes everything performed in the ``gitea`` meta-state\nin reverse order, i.e.\nstops the service,\nremoves the configuration file and then\nuninstalls the package.\nSome paths are left to avoid accidental data loss\n(namely ``GITEA_WORKDIR``, ``APP_DATA_PATH`` and the gitea user home).\n\n\n``gitea.package.clean``\n^^^^^^^^^^^^^^^^^^^^^^^\nRemoves Gitea.\nHas a dependency on `gitea.config.clean`_.\n\n\n``gitea.config.clean``\n^^^^^^^^^^^^^^^^^^^^^^\nRemoves Gitea configuration. Has a dependency on `gitea.service.clean`_.\n\n\n``gitea.service.clean``\n^^^^^^^^^^^^^^^^^^^^^^^\nStops the gitea service and disables it at boot time.\n\n\n``gitea.go.clean``\n^^^^^^^^^^^^^^^^^^\nRemoves the build user and Go installation.\n\n\n``gitea.mods.rst.clean``\n^^^^^^^^^^^^^^^^^^^^^^^^\nRemoves the built ``chroma`` binary, the build path and the\n``grst`` script.\n\n\n\nContributing to this repo\n-------------------------\n\nCommit messages\n^^^^^^^^^^^^^^^\n\n**Commit message formatting is significant!**\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\npre-commit\n^^^^^^^^^^\n\n`pre-commit \u003chttps://pre-commit.com/\u003e`_ is configured for this formula, which you may optionally use to ease the steps involved in submitting your changes.\nFirst install  the ``pre-commit`` package manager using the appropriate `method \u003chttps://pre-commit.com/#installation\u003e`_, then run ``bin/install-hooks`` and\nnow ``pre-commit`` will run automatically on each ``git commit``. ::\n\n  $ bin/install-hooks\n  pre-commit installed at .git/hooks/pre-commit\n  pre-commit installed at .git/hooks/commit-msg\n\nState documentation\n~~~~~~~~~~~~~~~~~~~\nThere is a script that semi-autodocuments available states: ``bin/slsdoc``.\n\nIf a ``.sls`` file begins with a Jinja comment, it will dump that into the docs. It can be configured differently depending on the formula. See the script source code for details currently.\n\nThis means if you feel a state should be documented, make sure to write a comment explaining it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-gitea-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkubb%2Fsalt-gitea-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-gitea-formula/lists"}