Compare commits
2 Commits
feature/23
...
9a61084f19
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a61084f19 | ||
|
|
8cc08e14eb |
1417
nodes/gitea-2.json
1417
nodes/gitea-2.json
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,6 @@ node.default["gitea"]["working_directory"] = "/var/lib/gitea"
|
|||||||
node.default["gitea"]["port"] = 3000
|
node.default["gitea"]["port"] = 3000
|
||||||
node.default["gitea"]["postgresql_host"] = "localhost:5432"
|
node.default["gitea"]["postgresql_host"] = "localhost:5432"
|
||||||
node.default["gitea"]["domain"] = "gitea.kosmos.org"
|
node.default["gitea"]["domain"] = "gitea.kosmos.org"
|
||||||
node.default["gitea"]["email"] = "gitea@kosmos.org"
|
|
||||||
|
|
||||||
node.default["gitea"]["config"] = {
|
node.default["gitea"]["config"] = {
|
||||||
"log": {
|
"log": {
|
||||||
@@ -23,5 +22,5 @@ node.default["gitea"]["config"] = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
node.default["gitea"]["act_runner"]["version"] = "0.2.13"
|
node.default["gitea"]["act_runner"]["version"] = "0.2.6"
|
||||||
node.default["gitea"]["act_runner"]["checksum"] = "3acac8b506ac8cadc88a55155b5d6378f0fab0b8f62d1e0c0450f4ccd69733e2"
|
node.default["gitea"]["act_runner"]["checksum"] = "234c2bdb871e7b0bfb84697f353395bfc7819faf9f0c0443845868b64a041057"
|
||||||
|
|||||||
@@ -19,17 +19,6 @@ jwt_secret = gitea_data_bag_item["jwt_secret"]
|
|||||||
internal_token = gitea_data_bag_item["internal_token"]
|
internal_token = gitea_data_bag_item["internal_token"]
|
||||||
secret_key = gitea_data_bag_item["secret_key"]
|
secret_key = gitea_data_bag_item["secret_key"]
|
||||||
|
|
||||||
apt_repository "git-core-ppa" do
|
|
||||||
uri "http://ppa.launchpad.net/git-core/ppa/ubuntu"
|
|
||||||
components ["main"]
|
|
||||||
key "E1DF1F24"
|
|
||||||
action :add
|
|
||||||
only_if do
|
|
||||||
node['platform'] == 'ubuntu' &&
|
|
||||||
Gem::Version.new(node['platform_version']) < Gem::Version.new('22.04')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
package "git"
|
package "git"
|
||||||
|
|
||||||
user "git" do
|
user "git" do
|
||||||
@@ -37,13 +26,6 @@ user "git" do
|
|||||||
home "/home/git"
|
home "/home/git"
|
||||||
end
|
end
|
||||||
|
|
||||||
directory "/home/git/.ssh" do
|
|
||||||
owner "git"
|
|
||||||
group "git"
|
|
||||||
mode "0700"
|
|
||||||
recursive true
|
|
||||||
end
|
|
||||||
|
|
||||||
directory working_directory do
|
directory working_directory do
|
||||||
owner "git"
|
owner "git"
|
||||||
group "git"
|
group "git"
|
||||||
@@ -96,8 +78,6 @@ if node.chef_environment == "production"
|
|||||||
end
|
end
|
||||||
|
|
||||||
config_variables = {
|
config_variables = {
|
||||||
domain: node["gitea"]["domain"],
|
|
||||||
email: node["gitea"]["email"],
|
|
||||||
working_directory: working_directory,
|
working_directory: working_directory,
|
||||||
git_home_directory: git_home_directory,
|
git_home_directory: git_home_directory,
|
||||||
repository_root_directory: repository_root_directory,
|
repository_root_directory: repository_root_directory,
|
||||||
@@ -118,16 +98,6 @@ config_variables = {
|
|||||||
s3_bucket: gitea_data_bag_item["s3_bucket"]
|
s3_bucket: gitea_data_bag_item["s3_bucket"]
|
||||||
}
|
}
|
||||||
|
|
||||||
bash "Generate git ed25519 keypair" do
|
|
||||||
user "git"
|
|
||||||
group "git"
|
|
||||||
cwd git_home_directory
|
|
||||||
code <<-EOH
|
|
||||||
ssh-keygen -t ed25519 -f #{git_home_directory}/.ssh/id_ed25519
|
|
||||||
EOH
|
|
||||||
creates "#{git_home_directory}/.ssh/id_ed25519"
|
|
||||||
end
|
|
||||||
|
|
||||||
template "#{config_directory}/app.ini" do
|
template "#{config_directory}/app.ini" do
|
||||||
source "app.ini.erb"
|
source "app.ini.erb"
|
||||||
owner "git"
|
owner "git"
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ APP_NAME = Gitea
|
|||||||
RUN_MODE = prod
|
RUN_MODE = prod
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
SSH_DOMAIN = <%= @domain %>
|
SSH_DOMAIN = gitea.kosmos.org
|
||||||
HTTP_PORT = 3000
|
HTTP_PORT = 3000
|
||||||
DISABLE_SSH = false
|
DISABLE_SSH = false
|
||||||
SSH_PORT = 22
|
SSH_PORT = 22
|
||||||
PROTOCOL = http
|
PROTOCOL = http
|
||||||
DOMAIN = <%= @domain %>
|
DOMAIN = gitea.kosmos.org
|
||||||
# Gitea is running behind an nginx reverse load balancer, use an HTTPS root URL
|
# Gitea is running behind an nginx reverse load balancer, use an HTTPS root URL
|
||||||
ROOT_URL = https://%(DOMAIN)s
|
ROOT_URL = https://%(DOMAIN)s
|
||||||
# REDIRECT_OTHER_PORT = true
|
# REDIRECT_OTHER_PORT = true
|
||||||
@@ -30,16 +30,6 @@ MAX_OPEN_CONNS = 20
|
|||||||
ROOT = <%= @repository_root_directory %>
|
ROOT = <%= @repository_root_directory %>
|
||||||
DISABLE_DOWNLOAD_SOURCE_ARCHIVES = true
|
DISABLE_DOWNLOAD_SOURCE_ARCHIVES = true
|
||||||
|
|
||||||
[repository.signing]
|
|
||||||
SIGNING_KEY = <%= @git_home_directory %>/.ssh/id_ed25519.pub
|
|
||||||
SIGNING_NAME = Gitea
|
|
||||||
SIGNING_EMAIL = git@<%= @domain %>
|
|
||||||
SIGNING_FORMAT = ssh
|
|
||||||
INITIAL_COMMIT = always
|
|
||||||
CRUD_ACTIONS = always
|
|
||||||
WIKI = always
|
|
||||||
MERGES = always
|
|
||||||
|
|
||||||
# [indexer]
|
# [indexer]
|
||||||
# ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
|
# ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
|
||||||
|
|
||||||
@@ -56,7 +46,7 @@ SMTP_ADDR = <%= @smtp_addr %>
|
|||||||
SMTP_PORT = <%= @smtp_port %>
|
SMTP_PORT = <%= @smtp_port %>
|
||||||
USER = <%= @smtp_user %>
|
USER = <%= @smtp_user %>
|
||||||
PASSWD = <%= @smtp_password %>
|
PASSWD = <%= @smtp_password %>
|
||||||
FROM = <%= @email %>
|
FROM = gitea@kosmos.org
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
INTERNAL_TOKEN = <%= @internal_token %>
|
INTERNAL_TOKEN = <%= @internal_token %>
|
||||||
|
|||||||
Reference in New Issue
Block a user