diff --git a/Makefile b/Makefile
index 49128ec..3ed479a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
################################
-# Makefile pour eole-gogs
+# Makefile pour eole-gitea
################################
SOURCE=eole-gitea
diff --git a/dicos/50_gitea.xml b/dicos/50_gitea.xml
index 9189e7a..150d1e2 100644
--- a/dicos/50_gitea.xml
+++ b/dicos/50_gitea.xml
@@ -4,7 +4,8 @@
-
+
+
443
@@ -14,7 +15,7 @@
apt-transport-https
git-core
-
+
forge
@@ -39,11 +40,11 @@
non
-
- non
-
-
-
+
+ non
+
+
+
@@ -64,7 +65,15 @@
localhost
-
+
+
+
+
+
+
+
+
+
@@ -85,14 +94,16 @@
gitea_email_user
gitea_email_password
-
+
oui
OR
- activer_revprox
+ activer_nginx_web
non
oui
non
+
+
non
gitea-nginx
@@ -102,6 +113,18 @@
oui
gitea_without_nginx
+
+
+ ['default', 'externe', 'local']
+
+
+ local
+ BDD Forge
+
+
+ default
+ BDD Forge
+
Activer la forge Gitea, Gitea est une forge basée sur Git clone de github (fork de gogs)
diff --git a/posttemplate/01-gitea-nginx b/posttemplate/01-gitea-nginx
index 7488ef9..348095f 100755
--- a/posttemplate/01-gitea-nginx
+++ b/posttemplate/01-gitea-nginx
@@ -1,11 +1,11 @@
#!/bin/bash
-ENABLE=`CreoleGet activer_gogs 'non'`
+ENABLE=`CreoleGet activer_gitea 'non'`
-if [ -L /etc/nginx/sites-enabled/gogs ];then
- rm -f /etc/nginx/sites-enabled/gogs
+if [ -L /etc/nginx/sites-enabled/gitea ];then
+ rm -f /etc/nginx/sites-enabled/gitea
fi
if [ "${ENABLE}" = 'oui' ];then
- ln -s /etc/nginx/sites-available/gogs /etc/nginx/sites-enabled/gogs
+ ln -s /etc/nginx/sites-available/gitea /etc/nginx/sites-enabled/gitea
fi
diff --git a/tmpl/00-create-gitea-db.sql b/tmpl/00-create-gitea-db.sql
index 391b762..3d9e6d9 100644
--- a/tmpl/00-create-gitea-db.sql
+++ b/tmpl/00-create-gitea-db.sql
@@ -1,13 +1,13 @@
-- example de création d'une base de données MySQL
-- création de la base de donnée
-CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_general_ci;
+CREATE DATABASE gitea CHARACTER SET utf8 COLLATE utf8_general_ci;
-- création du user de la base
-grant all privileges on gogs.* to gogs@%%container_ip_forge identified by 'gogs1234';
+grant all privileges on gitea.* to gitea@%%container_ip_forge identified by 'gitea1234';
flush privileges ;
-- connexion à la base
-\r gogs
+\r gitea
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
diff --git a/tmpl/gitea-db.yml b/tmpl/gitea-db.yml
index ecf8169..425fbc1 100644
--- a/tmpl/gitea-db.yml
+++ b/tmpl/gitea-db.yml
@@ -34,8 +34,8 @@ createscript: "/usr/share/eole/db/gitea/gen/00-create-gitea-db.sql"
%set cnt_prefix = %%getVar('container_path_reseau', '')
pwd_files:
- {file: '%%cnt_prefix/etc/gitea/conf/app.ini',
- pattern: 'PASSWD="',
- end_pattern: ';',
- owner: 'root:www-data',
+ pattern: 'PASSWD = ',
+ end_pattern: '',
+ owner: 'root:gitservice',
mod: '660' }
diff --git a/tmpl/gitea.conf b/tmpl/gitea.conf
index 9400c89..a2261c3 100644
--- a/tmpl/gitea.conf
+++ b/tmpl/gitea.conf
@@ -56,7 +56,18 @@ LANDING_PAGE = explore
; Either "mysql", "postgres" or "sqlite3", it's your choice
DB_TYPE = mysql
;FIXME FOR EOLEDB
-HOST = %%getVar("container_ip_mysql","127.0.0.1"):3306
+%set %%dbMode = %%getVar("gitea_db_mode")
+%if %%dbMode == "default"
+ %if %%edb_local == "oui"
+HOST = 127.0.0.1:3306
+ %else
+HOST = %%{edb_host}:%%{edb_port}
+ %end if
+%elif %%dbMode == "local"
+HOST = 127.0.0.1:3306
+%elif %%dbMode == "externe"
+HOST = %%{gitea_dbserver}:%%{gitea_dbport}
+%end if
NAME = gitea
USER = gitea
PASSWD=gitea1234