Ending gogs migration to gitea

This commit is contained in:
2018-10-30 16:32:58 +01:00
parent 8619edb520
commit 25763e68c0
6 changed files with 56 additions and 22 deletions

View File

@ -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";

View File

@ -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' }

View File

@ -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