add forgejo-formation
This commit is contained in:
parent
e47d9b3940
commit
5f0b99ef19
6 changed files with 104 additions and 0 deletions
|
@ -1,2 +1,3 @@
|
||||||
# dataset-formation
|
# dataset-formation
|
||||||
|
|
||||||
|
[This dataset application services](seed/README.md)
|
||||||
|
|
6
seed/README.md
Normal file
6
seed/README.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Application services
|
||||||
|
|
||||||
|
- [forgejo-formation](forgejo-formation/README.md): Formation in Forgejo
|
||||||
|
|
||||||
|
# Providers and suppliers
|
||||||
|
|
45
seed/forgejo-formation/README.md
Normal file
45
seed/forgejo-formation/README.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
---
|
||||||
|
forgejo: none
|
||||||
|
include_toc: true
|
||||||
|
---
|
||||||
|
|
||||||
|
# forgejo-formation
|
||||||
|
|
||||||
|
[All applications services for this dataset.](../README.md)
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Formation in Forgejo.
|
||||||
|
|
||||||
|
[For more informations](https://forgejo.org/)
|
||||||
|
|
||||||
|
## Dependances
|
||||||
|
|
||||||
|
- [forgejo (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/forgejo/README.md)
|
||||||
|
- [base-fedora-37 (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/base-fedora-37/README.md)
|
||||||
|
- [base-fedora (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/base-fedora/README.md)
|
||||||
|
- [systemd (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/systemd/README.md)
|
||||||
|
- [base-machine (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/base-machine/README.md)
|
||||||
|
- [base (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/base/README.md)
|
||||||
|
- [dns-local (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/dns-local/README.md)
|
||||||
|
- [pki-tls (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/pki-tls/README.md)
|
||||||
|
- [postgresql-client (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/postgresql-client/README.md)
|
||||||
|
- [reverse-proxy-client (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/reverse-proxy-client/README.md)
|
||||||
|
- [relay-mail-client (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/relay-mail-client/README.md)
|
||||||
|
- [redis-client (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/redis-client/README.md)
|
||||||
|
- [oauth2-client (in external dataset)](https://forge.cloud.silique.fr/gnunux/dataset/src/branch/main/seed/oauth2-client/README.md)
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
|
||||||
|
### Général (*general*)
|
||||||
|
|
||||||
|
#### forgejo (*general.forgejo*)
|
||||||
|
|
||||||
|
| Description | Type |
|
||||||
|
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| **Utilisateur de type admin** (*[forgejo_user](dictionaries/32_forgejo.xml)*) | [unix_user](https://forge.cloud.silique.fr/risotto/rougail/src/branch/main/doc/variable/README.md#le-type-de-la-variable) |
|
||||||
|
| **Courriel de l'admin** (*[forgejo_email](dictionaries/32_forgejo.xml)*) | [mail](https://forge.cloud.silique.fr/risotto/rougail/src/branch/main/doc/variable/README.md#le-type-de-la-variable) |
|
||||||
|
|
||||||
|
|
||||||
|
- [+]: variable is multiple
|
||||||
|
- **bold**: variable is mandatory
|
5
seed/forgejo-formation/applicationservice.yml
Normal file
5
seed/forgejo-formation/applicationservice.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
format: '0.1'
|
||||||
|
description: Formation in Forgejo
|
||||||
|
website: https://forgejo.org/
|
||||||
|
depends:
|
||||||
|
- forgejo
|
25
seed/forgejo-formation/dictionaries/32_forgejo.xml
Normal file
25
seed/forgejo-formation/dictionaries/32_forgejo.xml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<rougail version="0.10">
|
||||||
|
<variables>
|
||||||
|
<family name="network">
|
||||||
|
<variable name="incoming_ports" redefine="True">
|
||||||
|
<value>3333</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
|
<family name="forgejo">
|
||||||
|
<variable name="forgejo_user" type="unix_user" description="Utilisateur de type admin" mandatory="True"/>
|
||||||
|
<variable name="forgejo_email" type="mail" description="Courriel de l'admin" mandatory="True"/>
|
||||||
|
<variable name="forgejo_password" type="password" hidden="True" mandatory="True"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="get_password">
|
||||||
|
<param name="server_name" type="variable">domain_name_eth0</param>
|
||||||
|
<param name="username" type="variable">forgejo_user</param>
|
||||||
|
<param name="description">forgejo</param>
|
||||||
|
<param name="type">cleartext</param>
|
||||||
|
<param name="hide" type="variable">hide_secret</param>
|
||||||
|
<target>forgejo_password</target>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
</rougail>
|
22
seed/forgejo-formation/patches/forgejo.service.patch
Normal file
22
seed/forgejo-formation/patches/forgejo.service.patch
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
--- ../../../dataset/seed/forgejo/templates/forgejo.service 2023-01-03 11:30:06.865085785 +0100
|
||||||
|
+++ modif/forgejo.service 2023-02-14 10:13:27.985282958 +0100
|
||||||
|
@@ -20,18 +20,7 @@
|
||||||
|
Group=forgejo
|
||||||
|
WorkingDirectory=/srv/forgejo/lib/
|
||||||
|
ExecStart=/usr/bin/forgejo web --config /etc/forgejo/app.ini
|
||||||
|
-ExecStartPre=/bin/bash -c '%slurp
|
||||||
|
-/usr/bin/forgejo migrate --config /etc/forgejo/app.ini;%slurp
|
||||||
|
-if /usr/bin/forgejo admin auth list --config /etc/forgejo/app.ini | grep "OAuth2"; then %slurp
|
||||||
|
- echo "UPDATE";%slurp
|
||||||
|
- id=$(/usr/bin/forgejo --config /etc/forgejo/app.ini admin auth list |tail -n 1|awk "{ print \$1}");%slurp
|
||||||
|
- /usr/bin/forgejo admin auth update-oauth --id $id --name "%%domain_name_eth0" --provider "openidConnect" --key "%%oauth2_client_id" --secret "%%oauth2_client_secret" --scopes "profile email" --auto-discover-url "https://%%oauth2_client_server_domainname/.well-known/openid-configuration" --config /etc/forgejo/app.ini;%slurp
|
||||||
|
-else %slurp
|
||||||
|
- echo "CONFIGURE";%slurp
|
||||||
|
- /usr/bin/forgejo admin auth add-oauth --name "%%domain_name_eth0" --provider "openidConnect" --key "%%oauth2_client_id" --secret "%%oauth2_client_secret" --scopes "profile email" --auto-discover-url "https://%%oauth2_client_server_domainname/.well-known/openid-configuration" --config /etc/forgejo/app.ini;%slurp
|
||||||
|
-fi;%slurp
|
||||||
|
-sleep 2;%slurp
|
||||||
|
-echo "CONFIGURATION DONE"'
|
||||||
|
+ExecStartPre=-/bin/bash -c "/usr/bin/forgejo admin user create --username %%forgejo_user --password %%forgejo_password --email %%forgejo_email --admin -c /etc/forgejo/app.ini"
|
||||||
|
Restart=always
|
||||||
|
Environment=GITEA_WORK_DIR=/srv/forgejo/lib
|
||||||
|
|
Loading…
Reference in a new issue