Greg Karékinian 51d4d88568 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
2020-05-18 19:39:43 +02:00

29 lines
607 B
Plaintext

# 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;
}
}