Switch Discourse uploads and backups to Garage/S3
This commit is contained in:
@@ -8,3 +8,4 @@ version '0.1.0'
|
||||
chef_version '>= 14.0'
|
||||
|
||||
depends 'discourse'
|
||||
depends 'firewall'
|
||||
|
||||
@@ -4,3 +4,10 @@
|
||||
#
|
||||
|
||||
include_recipe 'discourse'
|
||||
|
||||
firewall_rule "garage_docker" do
|
||||
command :allow
|
||||
port node['garage']['s3_api_port']
|
||||
protocol :tcp
|
||||
source "172.17.0.1/24"
|
||||
end
|
||||
|
||||
@@ -5,6 +5,17 @@
|
||||
|
||||
include_recipe "kosmos-nginx"
|
||||
|
||||
file "/etc/nginx/conf.d/garage.conf" do
|
||||
content <<-EOF
|
||||
upstream garage_web {
|
||||
server localhost:3902;
|
||||
}
|
||||
|
||||
proxy_cache_path /var/cache/nginx/garage levels=1:2 keys_zone=garage_cache:10m
|
||||
max_size=1g inactive=60m use_temp_path=off;
|
||||
EOF
|
||||
end
|
||||
|
||||
domains = node['garage']['s3_web_domains']
|
||||
|
||||
domains.each do |server_name|
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
upstream garage_web {
|
||||
server localhost:3902;
|
||||
}
|
||||
|
||||
proxy_cache_path /var/cache/nginx/garage levels=1:2 keys_zone=garage_cache:10m
|
||||
max_size=1g inactive=60m use_temp_path=off;
|
||||
|
||||
server {
|
||||
listen 443 http2 ssl;
|
||||
listen [::]:443 http2 ssl;
|
||||
|
||||
Reference in New Issue
Block a user