Fully translated (but some work to do about urls)
This commit is contained in:
@ -8,18 +8,18 @@ main:
|
||||
# Gitea
|
||||
|
||||
::alert{type="info"}
|
||||
🎯 __Objectifs :__
|
||||
- Installer Gitea
|
||||
- Exposer Gitea avec Swag
|
||||
🎯 __Goals:__
|
||||
- Install Gitea
|
||||
- Expose Gitea using Swag
|
||||
::
|
||||
|
||||
[Gitea](https://https://about.gitea.com/) est une plateforme DevOps, permettant de gérer des dépots, à la manière de GitHub mais chez vous en selfhost.
|
||||
[Gitea](https://about.gitea.com/) is a self-hosted DevOps platform that allows you to manage repositories much like GitHub, but on your own infrastructure.
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
---
|
||||
Structure des dossiers
|
||||
Folder structure
|
||||
|
||||
```console
|
||||
root
|
||||
@ -28,7 +28,7 @@ root
|
||||
└── data
|
||||
```
|
||||
|
||||
Ouvrez Dockge, cliquez sur `compose`, appelez la stack `gitea` puis copiez collez ceci :
|
||||
Open Dockge, click on `compose`, name the stack `gitea`, and paste the following content:
|
||||
|
||||
```yaml
|
||||
---
|
||||
@ -52,67 +52,68 @@ services:
|
||||
- 3333:3000
|
||||
- 222:22
|
||||
```
|
||||
Et renseignez le `.env` avec les infos que vous avez trouvées, par exemple :
|
||||
|
||||
Fill out the `.env` file with the required information, for example:
|
||||
|
||||
```properties
|
||||
UID=1000
|
||||
GID=1000
|
||||
```
|
||||
|
||||
Déployez le conteneur et rendez-vous sur `http://ipduserveur:3333`. Et voilà, votre instance Gitea est disponible !
|
||||
Deploy the container and go to `http://yourserverip:3333`. Your Gitea instance is now up and running!
|
||||
|
||||
::alert{type="danger"}
|
||||
:::list{type="danger"}
|
||||
- __En cas d'échec :__ vérifiez les règles de votre pare-feu.
|
||||
- __If it fails:__ check your firewall rules.
|
||||
:::
|
||||
::
|
||||
|
||||
## Exposer Gitea avec Swag
|
||||
## Exposing Gitea with Swag
|
||||
---
|
||||
Tout l'intérêt d'une telle solution, c'est de pouvoir y accéder à distance et sur tout vos appareils. Pour cela, nous allons exposer Gitea via Swag.
|
||||
The benefit of this setup is being able to access it remotely from any of your devices. To do so, we’ll expose Gitea through Swag.
|
||||
|
||||
::alert{type="info"}
|
||||
:::list{type="info"}
|
||||
- __Au préalable :__ nous partons du principe que vous avez créé dans votre [zone DNS](/generalites/dns) un sous domaine du type `gitea.mondomaine.fr` avec pour `CNAME` `mondomaine.fr` et, [à moins que vous utilisiez Cloudflare Zero Trust](/serveex/securite/cloudflare), que que vous avez déjà redirigé le port `443` de votre box vers le `443` de votre serveur dans [les règles NAT](/generalites/nat).
|
||||
- __Prerequisite:__ We assume you have created a subdomain such as `gitea.yourdomain.com` in your [DNS zone](/generalites/dns) with `CNAME` pointing to `yourdomain.com`, and [unless you're using Cloudflare Zero Trust](/serveex/securite/cloudflare), you have already forwarded port `443` from your router to your server’s port `443` in the [NAT rules](/generalites/nat).
|
||||
:::
|
||||
::
|
||||
|
||||
Dans Dockge, rendez-vous dans la stack de SWAG et éditez le compose en ajoutant le réseau de gitea :
|
||||
In Dockge, go to the SWAG stack and edit the compose file by adding Gitea's network:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Relie le conteneur au réseau custom
|
||||
networks: # Connect the container to the custom network
|
||||
# ...
|
||||
- gitea # Nom du réseau déclaré dans la stack
|
||||
- gitea # Name of the declared network
|
||||
|
||||
networks: # Définit le réseau custom
|
||||
networks: # Define the custom network
|
||||
# ...
|
||||
gitea: # Nom du réseau déclaré dans la stack
|
||||
name: gitea_default # Nom véritable du réseau externe
|
||||
external: true # Précise que c'est un réseau à rechercher en externe
|
||||
gitea: # Name of the declared network
|
||||
name: gitea_default # Actual external network name
|
||||
external: true # Indicates it's an external network
|
||||
```
|
||||
|
||||
::alert{type="info"}
|
||||
:::list{type="info"}
|
||||
- Ici nous partons du principe que le nom du réseau de gitea est `gitea_default`. Vous pouvez vérifier que la connexion est opérationnelle en visitant le dashboard de SWAG en tapant http://ipduserveur:81.
|
||||
- We assume the Gitea network name is `gitea_default`. You can verify connectivity by visiting the SWAG dashboard at http://yourserverip:81.
|
||||
:::
|
||||
::
|
||||
|
||||
Relancez la stack en cliquant sur "déployer" et patientez le temps que SWAG soit complètement opérationnel.
|
||||
Redeploy the stack by clicking "Deploy" and wait until SWAG is fully operational.
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `gitea.subdomain.conf`.
|
||||
Inside the Swag folders, create the file `gitea.subdomain.conf`.
|
||||
|
||||
::alert{type="success"}
|
||||
✨ __Astuce :__ vous pouvez utiliser [File Browser](/serveex/files/file-browser) pour naviguer dans vos fichier et éditer vos documents au lieu d'utiliser les commandes du terminal.
|
||||
✨ __Tip:__ You can use [File Browser](/serveex/files/file-browser) to navigate and edit your files instead of using terminal commands.
|
||||
::
|
||||
|
||||
```shell
|
||||
sudo vi /docker/swag/config/nginx/proxy-confs/gitea.subdomain.conf
|
||||
```
|
||||
Entrez en modification avec la touche `i` et collez la configuration ci-dessous :
|
||||
Press `i` to enter edit mode and paste the configuration below:
|
||||
|
||||
```nginx
|
||||
## Version 2023/12/19
|
||||
@ -148,7 +149,7 @@ server {
|
||||
#include /config/nginx/authelia-location.conf;
|
||||
|
||||
# enable for Authentik (requires authentik-server.conf in the server block)
|
||||
#include /config/nginx/authentik-location.conf;
|
||||
#include /config/nginx/authentik-location.conf;
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
@ -171,28 +172,27 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
Appuyez sur `Echap` puis sauvegardez et quittez en tapant `:x` puis en appuyant sur `Entrée`.
|
||||
Press `Esc`, then save and exit by typing `:x` and hitting `Enter`.
|
||||
|
||||
Ouvrez le fichier `app.ini` dans les fichiers du conteneur
|
||||
Now open the `app.ini` file from the container's file system:
|
||||
|
||||
```shell
|
||||
sudo vi /docker/gitea/data/gitea/conf/app.ini
|
||||
```
|
||||
|
||||
Entrez en modification avec la touche `i` et et modifiez la section serveur avec les infos de votre domaine
|
||||
Press `i` to edit, then modify the server section with your domain information:
|
||||
|
||||
```properties
|
||||
[server]
|
||||
DOMAIN = gitea.mondomaine.fr
|
||||
SSH_DOMAIN = gitea.mondomaine.fr
|
||||
ROOT_URL = https://gitea.mondomaine.fr/
|
||||
DOMAIN = gitea.yourdomain.com
|
||||
SSH_DOMAIN = gitea.yourdomain.com
|
||||
ROOT_URL = https://gitea.yourdomain.com/
|
||||
```
|
||||
Appuyez sur `Echap` puis sauvegardez et quittez en tapant `:x` puis en appuyant sur `Entrée`.
|
||||
|
||||
Relancez le conteneur.
|
||||
Press `Esc`, save and exit with `:x`, then restart the container.
|
||||
|
||||
Et voilà, vous avez exposé Gitea !
|
||||
And that’s it! Gitea is now exposed to the web.
|
||||
|
||||
::alert{type="success"}
|
||||
✨ __Astuce :__ Vous pouvez protéger cette app avec Authentik de façon native en [suivant ces instructions](https://docs.goauthentik.io/integrations/services/gitea/).
|
||||
::
|
||||
✨ __Tip:__ You can natively protect this app with Authentik by [following these instructions](https://docs.goauthentik.io/integrations/services/gitea/).
|
||||
::
|
Reference in New Issue
Block a user