This commit is contained in:
Rafi594
2018-02-25 21:45:24 +01:00
commit d474571ed8
19 changed files with 909 additions and 0 deletions

51
conf/app.ini Normal file
View File

@ -0,0 +1,51 @@
;https://github.com/gogits/gogs/blob/master/conf/app.ini
APP_NAME = Gitea
RUN_USER = __APP__
RUN_MODE = prod
[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = __DB_USER__
USER = __DB_USER__
PASSWD = __DB_PASSWORD__
SSL_MODE = disable
PATH = data/gitea.db
[repository]
ROOT = __REPOS_PATH__
FORCE_PRIVATE = false
[server]
DOMAIN = __DOMAIN__
HTTP_PORT = __PORT__
ROOT_URL = https://__URL__/
DISABLE_SSH = false
SSH_PORT = 22
OFFLINE_MODE = false
APP_DATA_PATH = __DATA_PATH__
LANDING_PAGE = explore
[mailer]
ENABLED = true
HOST = 127.0.0.1:25
FROM = "Gitea" <gitea-noreply@__DOMAIN__>
SKIP_VERIFY = true
[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
ENABLE_REVERSE_PROXY_AUTHENTICATION = true
ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = true
[picture]
AVATAR_UPLOAD_PATH = __DATA_PATH__/avatars
[attachment]
PATH = __DATA_PATH__/attachments
[session]
PROVIDER = memory
[log]
MODE = file
LEVEL = Warn
ROOT_PATH = /var/log/__APP__
[security]
INSTALL_LOCK = true
SECRET_KEY = __KEY__
REVERSE_PROXY_AUTHENTICATION_USER = REMOTE_USER

11
conf/arm.src Normal file
View File

@ -0,0 +1,11 @@
SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.33/raspi2_armv6.zip
SOURCE_SUM=334bb5a053f3335f8a8c3c85728ff0d0b376d3a0b5b6470a0334b9172441a1af
# (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256
SOURCE_SUM_PRG=sha256sum
# (Optional) Archive format
# default: tar.gz
SOURCE_FORMAT=zip
# (Optional) Put false if sources are directly in the archive root
# default: true
SOURCE_IN_SUBDIR=true

11
conf/i386.src Normal file
View File

@ -0,0 +1,11 @@
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.3.3/gitea-1.3.3-linux-386
SOURCE_SUM=1b746cccffca446876ccc71efe328699f002622dab1d438e2142c8d7c23a22d7
# (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256
SOURCE_SUM_PRG=sha256sum
# (Optional) Archive format
# default: tar.gz
SOURCE_FORMAT=zip
# (Optional) Put false if sources are directly in the archive root
# default: true
SOURCE_IN_SUBDIR=true

3
conf/login_source.sql Normal file
View File

@ -0,0 +1,3 @@
INSERT INTO `__APP__`.`login_source` (`id`, `type`, `name`, `is_actived`, `cfg`, `created_unix`, `updated_unix`) VALUES
('1', '2', 'Yunohost LDAP', '1', '{"Name":"Yunohost LDAP","Host":"localhost","Port":389,"UseSSL":false,"BindDN":"","BindPassword":"","UserBase":"ou=users,dc=yunohost,dc=org","AttributeName":"givenName","AttributeSurname":"sn","AttributeMail":"mail","Filter":"(uid=%s)","AdminFilter":"(uid=__ADMIN__)","Enabled":true}', '1464014433', '1464015955')
ON DUPLICATE KEY UPDATE cfg='{"Name":"Yunohost LDAP","Host":"localhost","Port":389,"UseSSL":false,"BindDN":"","BindPassword":"","UserBase":"ou=users,dc=yunohost,dc=org","AttributeName":"givenName","AttributeSurname":"sn","AttributeMail":"mail","Filter":"(uid=%s)","AdminFilter":"(uid=__ADMIN__)","Enabled":true}'

16
conf/nginx.conf Normal file
View File

@ -0,0 +1,16 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_pass http://localhost:__PORT__/;
proxy_set_header Host $host;
proxy_buffering off;
fastcgi_param REMOTE_USER $remote_user;
client_max_body_size 50M;
# Force https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}

24
conf/systemd.service Normal file
View File

@ -0,0 +1,24 @@
[Unit]
Description=Gitea
After=syslog.target
After=network.target
After=mysql.service
After=slapd.service
[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=/home/__APP__
ExecStart=/opt/__APP__/gogs web
Restart=always
Environment=USER=__APP__ HOME=/home/__APP__
[Install]
WantedBy=multi-user.target

11
conf/x86-64.src Normal file
View File

@ -0,0 +1,11 @@
SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.33/linux_amd64.zip
SOURCE_SUM=7f0841a0451174349bf058e3827a0f46b8a827de0303827a6ff6d20fd03db3ff
# (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256
SOURCE_SUM_PRG=sha256sum
# (Optional) Archive format
# default: tar.gz
SOURCE_FORMAT=zip
# (Optional) Put false if sources are directly in the archive root
# default: true
SOURCE_IN_SUBDIR=true