update dev-lang/go, www-apps/gitea ebuilds

This commit is contained in:
2019-05-26 22:12:11 +03:00
parent 17039da5e0
commit 037ed620de
11 changed files with 181 additions and 462 deletions

View File

@@ -0,0 +1,4 @@
[log]
MODE = file
LEVEL = Info
ROOT_PATH = /var/log/gitea

View File

@@ -0,0 +1,14 @@
# Gitea configuration
GITEA_CONF="/etc/gitea/app.ini"
# Gitea user
GITEA_USER="git"
# Gitea group
GITEA_GROUP="git"
# Gitea working directory
GITEA_WORK_DIR="/var/lib/gitea"
# Gitea custom directory
GITEA_CUSTOM="${GITEA_WORK_DIR}/custom"

View File

@@ -0,0 +1,22 @@
#!/sbin/openrc-run
# Copyright 2016-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Gitea, a self-hosted Git service"
: ${GITEA_CONF:=/etc/gitea/app.ini}
: ${GITEA_USER:=git}
: ${GITEA_GROUP:=git}
: ${GITEA_WORK_DIR:=/var/lib/gitea}
: ${GITEA_CUSTOM:=${GITEA_WORK_DIR}/custom}
command="/usr/bin/gitea web"
command_args="--config ${GITEA_CONF}"
command_background="true"
command_user="${GITEA_USER}:${GITEA_GROUP}"
error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.err"
output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
pidfile="/run/${RC_SVCNAME}.pid"
required_files="${GITEA_CONF}"
start_stop_daemon_args="-e GITEA_WORK_DIR=${GITEA_WORK_DIR} \
-e GITEA_CUSTOM=${GITEA_CUSTOM}"

View File

@@ -0,0 +1,28 @@
[Unit]
Description=Gitea service
Documentation=https://docs.gitea.io/
AssertPathIsDirectory=/var/lib/gitea
AssertPathIsReadWrite=/var/lib/gitea
After=network.target
Requires=network.target
After=mysqld.service
After=postgresql.service
After=memcached.service
After=redis.service
[Service]
User=git
Group=git
Environment="GITEA_WORK_DIR=/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom"
WorkingDirectory=/var/lib/gitea
ExecStart=/usr/bin/gitea web --config /etc/gitea/app.ini
Restart=always
PrivateTmp=true
Nice=5
[Install]
WantedBy=multi-user.target