fix(storage01): Fix garage and peertube config

This commit is contained in:
Tom Hubrecht 2023-10-05 23:28:27 +02:00
parent 3785088616
commit de5fe11f84
2 changed files with 19 additions and 5 deletions

View file

@ -6,6 +6,9 @@ let
data_dir = "/data/slow/garage/data"; data_dir = "/data/slow/garage/data";
metadata_dir = "/data/fast/garage/meta"; metadata_dir = "/data/fast/garage/meta";
buckets = [ "peertube-videos-dgnum" ];
in { in {
services.garage = { services.garage = {
enable = true; enable = true;
@ -54,18 +57,25 @@ in {
${host} = { ${host} = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
serverAliases = builtins.map (b: "${b}.${host}") buckets;
locations."/".extraConfig = '' locations."/".extraConfig = ''
proxy_pass http://127.0.0.1:3900; proxy_pass http://127.0.0.1:3900;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host; proxy_set_header Host $host;
# Disable buffering to a temporary file. # Disable buffering to a temporary file.
proxy_max_temp_file_size 0; proxy_max_temp_file_size 0;
client_max_body_size 200M;
''; '';
}; };
${webHost} = { ${webHost} = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
serverAliases = builtins.map (b: "${b}.${webHost}") buckets;
locations."/".extraConfig = '' locations."/".extraConfig = ''
proxy_pass http://127.0.0.1:3902; proxy_pass http://127.0.0.1:3902;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View file

@ -9,17 +9,21 @@ in {
object_storage = { object_storage = {
enabled = true; enabled = true;
endpoint = "s3.dgnum.eu"; endpoint = "https://s3.dgnum.eu";
region = "garage"; region = "garage";
max_upload_part = "150MB";
videos = { videos = {
bucket_name = "peertube-videos-dgnum"; bucket_name = "peertube-videos-dgnum";
prefix = "web-videos"; prefix = "web-videos/";
base_url = "https://peertube-videos-dgnum.cdn.dgnum.eu";
}; };
streaming_playlists = { streaming_playlists = {
bucket_name = "peertube-videos-dgnum"; bucket_name = "peertube-videos-dgnum";
prefix = "streaming-playlists"; prefix = "streaming-playlists/";
base_url = "https://peertube-videos-dgnum.cdn.dgnum.eu";
}; };
}; };