Initial kosmos_gitea cookbook

The default recipe deploys the gitea binary, generates a config file and
our custom Kosmos label set. The service runs as a Systemd unit.

The pg_db recipe needs to run on the primary PostgreSQL (currently
andromeda).

The backup recipe is empty for now

Refs #147
This commit is contained in:
Greg Karékinian
2020-05-18 19:39:43 +02:00
parent 20cbc678bc
commit 51d4d88568
15 changed files with 594 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# Generated by Chef
upstream _gitea {
server localhost:<%= @upstream_port %>;
}
server {
<% if File.exist?(@ssl_cert) && !File.exist?(@ssl_key) -%>
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name <%= @server_name %>;
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
add_header Strict-Transport-Security "max-age=31536000";
<% else -%>
listen 80;
server_name <%= @server_name %>;
<% end -%>
location / {
# Increase number of buffers. Default is 8
proxy_buffers 1024 8k;
proxy_pass http://_gitea;
proxy_http_version 1.1;
}
}